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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Field

Status
Not open for further replies.

LeighW

Programmer
Jun 6, 2001
45
GB
I have a input field on a form which defaults to a variable:

<input type=&quot;text&quot; name=&quot;datecomplete&quot; size=&quot;50&quot; value=&quot;<%=p_datecomplete%>&quot;>

When the form is submitted it writes to an access database.

I want it to be formated as dd/mm/yy but,

if I enter 13/12/01 it writes 01/12/2013 to the DB

but if i enter 13/12/2001 it writes 13/12/2001

It seems V. strange,

Is there a way I can format the field to accept dates in the format dd/mm/yy

Thanks

Leigh
 
is your database field set to date format? if so, consider handling it as a string instead, that may eliminate the problem and allow you to manipulate the date should you need to by &quot;stipping&quot; off whatever you might need.
hth
mb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top