Does anyone know how I can take the date and then convert it into a DDMMYY format ?
It is being used in an ASP page that calls the current days logs so there can't be any /.
<%
Dim theDay, theMonth, theYear, theDate
theDay = Day(now())
if cstr(theDay) < 2 then
theDay = "0" & theDay
end if
theMonth = Month(now())
if cstr(theMonth) < 2 then
theMonth = "0" & theMonth
end if
theYear = Year(now())
theDate = theYear & theMonth & theDay '(swap these around for how you want it)
response.write(theDate)
%>
man where were you when I needed ya... heheh...
my problem was that I wanted to get my data and time to line up perfectly on a page with a list of times
MM-DD-YYYY hh:mm: tt
I finally did get it to work by first going into the control panel and changing the format in regional settings. And also by editing the registry:
HKEY_USERS/.DEFAULT/Control Panel/International
then with the FormatDateTime(date) method I got it the way I wanted. sorta (grin)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.