Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a date to ACCESS!

Status
Not open for further replies.

bomayed

Technical User
May 13, 2002
101
AE
When a user is using the ASP page which I've created he is asked to input a date.

This date is added to the database which is stored in Microsoft Access.

When calling this date and displaying it in the browser it appears in different format!!

for example this date 21/11/2003 appears something like : 12:01:22 as if it was a time or something . .

can someone explain to me why this is happening?

Thank you



 
A DateTime value is stored as a number. The string you are getting is the libraries default format for a date value. If you want a different format you have to do that yourself. Depending on which script language you use it is completely different.

-pete
 
vb/vbscript > formatdatetime(yourdatehere, vbshortdate)

You must have it in the database as a date first. Check there to see that the entire date is present.

Jonathan Galpin MCSD
because software should be easy to use
 
u hv to pay attention in your code when u want to save the date input to MS Access table. that's the 1st.
the 2nd : if u use ASP VBscript u can try to use function of
Code:
FormatDateTime (-dateExpr- , -EnumDateTimeFormat-)
.
for the EnumDateTimeFormat, u can explore in MSDN index (there're long date format, short date format, short time format,etc)

Regards,
JJ [bigears]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top