This topic is locked

Date Handling

6/28/2006 7:10:48 PM
ASPRunnerPro General questions
B
barljo00 author

I have a number of date fields in my DB. If I use the format simple edit box with datepicker, and try to compare < or > a date field stored in my Access DB, I'm not getting a hit.
I've tried reformatting both dates to be in string YYYY/MM/DD sequence and compare the 2 - doesn't work. Here are the various if statements I've created in the BeforeEdit event:
if strInitPlannedDt < strPrevPlannedDt then
if CDate(strInitPlannedDt) < CDate(strPrevPlannedDt) then
if CDate(strInitialPlannedDt) < CDate(strPrevPlannedDt) then
The strPrevPlannedDt date is coming from the "select * from qProjectDR_Sys where ProjectRelease =" & iProjectRelease - gives me a group of records that have different dates or nulls. The nulls I skip with my code, but the non-nulls, I'm trying to see if a date the user wants to add (which is 1 of the selected records that will be bypassed if nulls).
I've placed strategic Response.Write commands along the way showing the values of the fields and they look correct and s/b hitting a true condition on the if statements.
Here is the display I do prior to the if statement: CDate strInitPlannedDt < CDate strPrevPlannedDt = 6/5/2006<6/30/2006
HELP!!
Tks,

Joan