This topic is locked

Date format between Dict and OldValues

9/5/2008 3:51:31 PM
ASPRunnerPro General questions
R
Rhoffman author

I have an AfterEdit event that compares two dates and processes if the dates are different.
What is happening is that I use oldDate=oldvalues("CDD_Migration") and it stores 08/05/2008.
I then use newDate=dict("CDD_Migration") and it stores 2008-5-8
As you can guess, IF sees them as different dates. How can I get the values to be in the same format for comparison purposes?
Thanks in advance

R
Rhoffman author 9/5/2008

I figured it out. You need to wrap each date field in a FormatDateTime() to make them the same.
EX: FormatDateTime(oldvalues("CDD_Migration"), 2)