Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statements and Dates

Status
Not open for further replies.

Cohen227

MIS
Oct 30, 2001
8
US
I'm trying to do something like this:

If (UDate < 5/19/02){&quot;<5/19&quot;} else {&quot;>5/19&quot;}

But there is something wrong with my syntax...Any help?
 
Two things come to mind:
1) JavaScript requires an &quot;if&quot; not an &quot;IF&quot; - but I'm not sure if that was just a formatting change when you typed it in the post or not
- or -
2) UDate is a different format...but you would think it would show something.

I did this and the syntax was fine:

var UDate = 5/19/02;
if (UDate < 5/19/02){&quot;<5/19&quot;} else {&quot;>5/19&quot;};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top