I need some help

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jelsner
Newbie
Posts: 1
Joined: Fri Jan 21, 2005 4:38 pm

I need some help

Post by jelsner » Fri Jan 21, 2005 4:43 pm

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

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Jan 21, 2005 4:52 pm

This thread should provide what you need http://www.mjtnet.com/usergroup/viewtop ... =yesterday

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat Jan 22, 2005 1:51 am

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
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts