|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Fri Oct 28, 2005 10:18 pm
Date Formatting |
I am having trouble with the following:
#mss {mydate=Format(DateAdd(~"m~", -1, Date),~"Long Date~")}
It gives a Type mismatch: 'Format' (error 13) on line 1, column 1
while
#mss {mydate=DateAdd(~"m~", -1, Date)}
displays properly.
Using
#show %mss(%eval(mydate))
to evaluate the expression.
Any advice would be appreciated.
Thanks! |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Sat Oct 29, 2005 12:41 am |
Seems I get to answer my own question.
Format() is a VBA function.
FormatDateTime is a VBScript function.
The correct function is FormatDateTime()
Here is an example:
#SHOW %eval(%mss(FormatDateTime(Now(), vbLongDate)))
Constant Code Result Example
0 FormatDateTime(Now(), vbGeneralDate) 11/15/2010 2:23:43 PM
1 FormatDateTime(Now(), vbLongDate) Saturday, January 14, 2904
2 FormatDateTime(Now(), vbShortDate) 11/15/2010
3 FormatDateTime(Now(), vbLongTime) 4:24:21 AM
4 FormatDateTime(Now(), vbShortTime) 04:24
Simply replace vbLongDate with the desired Code Result.
Cheers! |
|
|
|
|
|
|
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
|
|