A problem related to dates...

# Thread: A problem related to dates...

1. Member
Join Date
Dec 1969
Posts
60

## A problem related to dates...

Is there a function in ASP that gives the difference of days between to dates?<BR><BR>Thanks!!!

2. Senior Member
Join Date
Dec 1969
Posts
2,031

## RE: A problem related to dates...

firstDate = whatever<BR>secondDate = whatever_else<BR>numDays = DateDiff("d",firstDate,secondDate)

3. Member
Join Date
Dec 1969
Posts
60

## RE: A problem related to dates...

Kristin, I tried that option already. You see, I have these two dates:<BR><BR>ldt_change = A date<BR>d_today = actual date<BR><BR>If DateDiff("d", CDate(ldt_change), CDate(d_today)) &#062; 30 Then<BR> blablabla<BR>Else<BR> blablabla<BR>End If<BR><BR>So, I tested this :<BR><BR>If DateDiff("d", 9/27/2001, 10/24/2001) &#062; 30 Then...<BR><BR>And I got 3...<BR><BR>Is there another way to get the difference? I mean, It&#039;s like almost a month of difference between these 2 dates<BR><BR>Thanks again!!!<BR><BR><BR>

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

## Try

If DateDiff("d", #9/27/2001#, #10/24/2001#) &#062; 30 Then<BR><BR>Can&#039;t help ya anymore, I&#039;m gone for the day. Hopefully this works.

5. Member
Join Date
Dec 1969
Posts
60

## RE: Try

Thanks!!!

#### Posting Permissions

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