PDA

View Full Version : ASP date question


SteveH
02-01-2010, 05:09 PM
Hello

Where would I place the following please in my script:


<%session.lcid=2057%>
<%
Datemmddyyyy=Now()
Dateddmmyyyy=month(Datemmddyyyy)&"/"&day(Datemmddyyyy)&"/"&year(Datemmddyyyy)&" "&FormatDateTime(Datemmddyyyy,3)
%>

My HTML page begins like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

- but the layout of the page becomes distorted if I place it before the
]<!DOCTYPE html PUBLIC "-// etc

Thanks.

Steve

Old Pedant
02-01-2010, 06:49 PM
Should be able to put it anyplace. even before the <!doctype ... Dunno why that didn't work for you.

But generally I put stuff like this just before the <head> tag, in case I want to use the result in generating content for the <head>.