cdates compasion

1. Senior Member
Join Date
Dec 1969
Posts
360

cdates compasion

I&#039;m comparing 2 dates to check if one has the default date set....but no matter what date it is compared to it always displayed true...<BR><BR>If cdate(rsTicketSearch("end_date"),2) = cdate("1/1/1900") then<BR> seconds = 0<BR> response.write "true"<BR> Else<BR> seconds = (formatNumber(DateDiff("N", rsTicketSearch("order_date"), rsTicketSearch("end_date"))/60,2))* 3600<BR> End if

2. Senior Member
Join Date
Dec 1969
Posts
360

sorry cdates comparision not compassion

hooked on phonics worked for me : )

3. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

, 2??

what does the ,2 do??<BR><BR>what language is that?<BR>

4. Senior Member
Join Date
Dec 1969
Posts
11,247

RE: cdates compasion

Id Do<BR><BR>If datediff("D",rsTicketSearch("end_date"),cdate("1/1/1900")) = 0 then<BR><BR><BR>And BTW cdate() only takes One parameter

5. Senior Member
Join Date
Dec 1969
Posts
96,118

I don't get...

...why (a) you use FORMATNUMBER in there and (b) why you get the time diff in minutes, divide that by 60 to get hours, and then multiply that to get seconds????????<BR><BR> seconds = DateDiff("s",rsTicketSearch("order_date"),rsTicket Search("end_date"))<BR><BR>Anyway, WHY are you looking for a date of 1/1/1900 ??????<BR><BR>Did you specifically put that date in, by hand, yourself?? If not, the *DEFAULT* "zero date" is *NOT* 1/1/1900. It is 12/30/1899.<BR><BR>A better way to do this is<BR> IF CDBL(rsTicketSearch("end_date")) = 0 Then<BR>if you are looking for the so-called "zero date".<BR><BR>

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•