Discussion Locked

Date Formats In Access 2000

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to a make a date (04/03/03) - month, day, year - that is typed into a text box on an Access form be saved to the table in a different format (030304) - year, day, month.

Is there anyone out there that can help me?

4 replies

by jackofalltech

Assuming you want to store the date as a string...

sNewDate = Format(DateValue(sOldDate), "yyddmm")

Ralph

by saqibmabbasi

Hello,

Suppose that the data is saved in the database when you press a button. then what you can do is
in the button click event use the format function as follows

someString = format(yourDate, newFormat)
here "yourDate" is the date that isentered.
newFormat is the format you want to save the data in like "yyddMM".

and someString is just to assign the date into a variable then save. you can also save the date directly without assigning it to a variable.

hope this helps.

This discussion is closed to new replies.