Asp If with Date() noit working

  • Thread starter Thread starter Mettá
  • Start date Start date
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
 
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
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top