BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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
deleted_user
Not applicable
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

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3451 views
  • 0 likes
  • 2 in conversation