View Full Version : Date and time question
10-21-2003, 12:13 AM
I wonder what code I should use instead of this:
if I only want the date and not the time?
I tried this:
but it didn't work :(
10-21-2003, 01:54 AM
10-21-2003, 03:38 AM
<% = Date() %>
(Same thing, just that <% = variable %> is a shortcut, if you're in the middle of HTML formatting)
10-21-2003, 06:58 AM
this didn't work either:
I really need to get ried of the timestamp that I get with
when it's saved to the database
10-21-2003, 02:44 PM
When it's saved to the database? Tried using SMALLDATETIME?
10-22-2003, 06:05 AM
P.S. I'm not sure what you mean... try this:
<% = FormatDateTime(Now(),2) %>
That just shows up as:
Are you looking to only store this info in the database? I usually like to record a fairly specific time in the db (i.e. DATETIME in SQL Server) in case anything bad happens! You can always reformat it when you display it.
If you're using the above code, and it isn't working, please provide more details. :)
10-22-2003, 10:17 PM
I got ot to work now, I just missed to change the code at
one spot in the code ;)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.