Asp If with Date() noit working

M

Mettá

Hi

For some reason the following is not working on an ASP page

At top of page before <html>
<% Session.LCID=2057%>

Within <body>

<%If Date()>"13/01/2006" Then%> bla bla <%End If%>

</body>

For some reason the "bla bla" is showing yet the date is not beyond
13/01/2006 ?

If I put in a <%=Date()%> I get today's date as 25/03/2005

Anyone got any ideas?

M
 
J

Jon Spivey

Hi,
Session locales only work when you cast a value as a date, eg this would
work
<%
if date() > cdate("13/01/2006") then
' whatever
end if
%>
or this
<%
if date() > formatdatetime("13/01/2006") then
' whatever
end if
%>
 
Top