Print Page | Close Window

Date Formating Help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=6567
Printed Date: 31 March 2026 at 4:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Date Formating Help
Posted By: twooly
Subject: Date Formating Help
Date Posted: 19 October 2003 at 5:47pm

I am having troubles formating my date.  I can get the date out of the database just fine but I want to format it to look better.  Basicly I get the date like this 10/18/2003  and would like it to look like this Saturday, Octobler 18, 2003.  So I found the formatdatetime function but I am having troubles with it.  Here is some code that I have tried (the line is red is the line I am having troubles with)

startdate = rs("startDate")

response.write startdate

displaydate = FormatDateTime('& startdate &',1)

response.write displaydate

Thanks

--Todd




Replies:
Posted By: Gullanian
Date Posted: 19 October 2003 at 6:14pm

startdate = rs("startDate")

Response.write(weekdayname(weekday(startDate)))
Response.write(", ")
Response.write(monthname(month(startDate)))
Response.write(" ")
Response.write(day(startDate))
Response.write(", ")
Response.write(year(startDate))



Posted By: Phat
Date Posted: 19 October 2003 at 6:42pm
Or

startdate = rs("startDate")

response.write startdate

displaydate = FormatDateTime(startdate,1)

response.write displaydate




-------------
http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells


Posted By: twooly
Date Posted: 19 October 2003 at 6:47pm
Thanks Gullanian that worked.  Phat I tried that and I get Type mismatch error


Posted By: Gullanian
Date Posted: 19 October 2003 at 7:23pm

No problemo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net