The SAS Output Delivery System and reporting techniques

Date format in dd/mm/yyyy in ODS TAGSETS.EXCELXP

Reply
N/A
Posts: 0

Date format in dd/mm/yyyy in ODS TAGSETS.EXCELXP

Hi,
I am having problems in getting date with format dd/mm/yyyy in EXCEL sheet using ODS TAGSETS.EXCELXP tagset.
Th code i used in my program is as follows :
VAR RETSDDT/ style={just=c tagattr='format:jddte'};
This gives the date as 26JAN2009. But I want the date like 26/01/2009.
Can anyone help me how to code this?
SAS Super FREQ
Posts: 8,739

Re: Date format in dd/mm/yyyy in ODS TAGSETS.EXCELXP

Hi:
I'm not sure what "format:jddte" represents. Is that a valid Microsoft date specification?

When I change a date using TAGATTR, I always specify the format value using M, D and YYYY:
[pre]
var date / style(data)={tagattr="Format:d-m-yyyy"}; (Proc PRINT)
OR
define date / style(column)={tagattr="Format:d/m/yyyy"}; (Proc REPORT)
[/pre]

If you continue to have issues using TAGATTR and TAGSETS.EXCELXP to format dates, you might want to open a track with Tech Support on this issue.

cynthia
N/A
Posts: 0

Re: Date format in dd/mm/yyyy in ODS TAGSETS.EXCELXP

Cynthia,
Thanks for your time. I appreciate it.
Your solution looks good, however it did not work. I am sure I have to issue a ticket with Techsupport.
"format:jddte" some how gets Julian date and it works for me. I think i got that somewhere from online itself.

I defined date field as DDMMYY10. in my SAS code. And I referred to as CHAR field in my EXCELXP tagset. So it worked.

I also want to thank you for responding to my all my previous questions.

Thanks
Raju
Ask a Question
Discussion stats
  • 2 replies
  • 880 views
  • 0 likes
  • 2 in conversation