I need some help
Moderators: JRL, Dorian (MJT support)
I need some help
I need to get yesterday's date and have it in mmddyyyy format. I am very new at this. Please help. Thank you. I am using GetDate but the format returns m/d/yyyy and i don't want to change regional settings. Also if you know how to perform a replace function, that would be great. Thanks again
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
This thread should provide what you need http://www.mjtnet.com/usergroup/viewtop ... =yesterday
VBSTART
Function mmddyyyy(thedate)
mm = Right("0" & CStr(Month(thedate)),2)
dd = Right("0" & CStr(Day(thedate)),2)
yyyy=Year(thedate)
mmddyyyy=mm & dd & yyyy
End Function
VBEND
VBEval>mmddyyyy(date-1),yesterday
Function mmddyyyy(thedate)
mm = Right("0" & CStr(Month(thedate)),2)
dd = Right("0" & CStr(Day(thedate)),2)
yyyy=Year(thedate)
mmddyyyy=mm & dd & yyyy
End Function
VBEND
VBEval>mmddyyyy(date-1),yesterday
MJT Net Support
[email protected]
[email protected]