SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Two Digit Date

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Two Digit Date
Author Message
Kevin H



Joined: 04 Oct 2004
Posts: 13

Post Two Digit Date Reply with quote

Hi,

I get the day of the month using this line:
DateTimePart ( Daytime, "dd", DayNow )

Dec. 2nd for example, it will return a value of "2".
Is there a way to make it return a two digit value so today will be "02"?

Thank you!

Thu Dec 02, 2004 3:10 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Two Digit Date Reply with quote

DateTimePart always returns numeric value. There exist a number of ways how you can convert and format it to 2-digit string, but I think what you are trying to get could be as simple as below

Dim( DayNow, string, "@T"dd"" )
MessageBox( DayNow )

: Hi,

: I get the day of the month using this line: DateTimePart ( Daytime,
: "dd", DayNow )

: Dec. 2nd for example, it will return a value of "2".
: Is there a way to make it return a two digit value so today will be
: "02"?

: Thank you!

Thu Dec 02, 2004 3:29 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.