Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date Format
#1
Guys,

I'm trying to convert a date to the American pattern.
I want 01/20/2003, instead of 20/01/2003
How can I do that? I tried:

Code:
Copy      Help
DATE d="27/01/2003"
d=d-7
str sf=d.ToStrFormat("{MM/dd/yyyy}")
out sf
#2
Macro Macro2714
Code:
Copy      Help
DATE d="27/01/2003"
d=d-7
str sf.timeformat("{MM/dd/yyyy}" d)
out sf
or

Macro Macro2714
Code:
Copy      Help
DateTime d.FromStr("27/01/2003")
d.AddParts(-7)
str sf=d.ToStrFormat("{MM/dd/yyyy}")
out sf
#3
Great!!!!!

Thanks a lot!


Forum Jump:


Users browsing this thread: 1 Guest(s)