Solved

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

Posted on 2012-04-03
2
228 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

17 Experts available now in Live!

Get 1:1 Help Now