Subscribe Bookmark RSS Feed

can i convert date mm/dd/yyyy to character "mmddyyyy"

gow

Community Trekker

Joined:

May 8, 2012

I need to concat the date information with the file name, however during concat the date variable changes to sas or hexadecimal format. Thanks Gowri

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Use the Format statement to convert to text:

a = today();

b = format(a, "mmddyyyy");

print(b);

Yields the result:

"05232012"

gow

Community Trekker

Joined:

May 8, 2012

thanks, This was exactly what i was looking for!!