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

update Date field in database 1

Status
Not open for further replies.

JeroenB

Programmer
Apr 8, 2001
93
BE
Hi,

I have the following problem;

In my asp page I've difined three select field in which people can submit the day(1->31), month(1->12) and year(4 digits) of their birth.
The prob is now that I want these values to be written to ONE Date field in my acces database.

Any ideas ?
Thanks
JeroenB
 
You must concatenate the 3 values.

DateSerial(Year, Month, Day)
The DateSerial function converts the arguments into the variant of subtype Date.

There are three mandatory arguments.
o The Year argument is the year as a string or integer.
o The Month argument is the month as a string or integer.
o The Day argument is the Day as a string or integer.

Code:
<% =DateSerial(1943, 6, 26) %>

Output:
6/26/43

Code:
<% =DateSerial(&quot;43&quot;, &quot;6&quot;, &quot;26&quot;) %>

Output:
6/26/43


br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top