Solved

problem with date before other date (if  ....)

Posted on 2012-04-03
2
230 Views
Last Modified: 2012-04-03
i want to compare two dates, but it doesn't work, can anyone help me?

thx


<%
            date_pivot = "16/03/" & year(now)
            
            if date() < date_pivot then%>
            <%=date()+30%>
            <% else%>
            <%=date()+7%>
            <% end if%>
%>
0
Comment
Question by:fedkris
2 Comments
 
LVL 17

Accepted Solution

by:
sonawanekiran earned 500 total points
ID: 37800300
Have you tried like this.....

If DateDiff("d", Date1, Date2) > 1
  'Date1 is before Date2
Else
  '  'Date1 is after Date2
End If
0
 

Author Closing Comment

by:fedkris
ID: 37800937
it works for me, thx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now