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

Updating dates in a table with an update query 2

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a table in my database with a date field--the dates are formatted like this: 20000908. I want to somehow--probably using an update query--change the date to be formatted like this: 9/8/00. How do I do this?
 
Have you tried using the format or CDate function in the value to be updated? [sig][/sig]
 
You could do it in code like this:

Private Sub Command4_Click()
Dim yy As String
Dim dd As String
Dim mm As String
yy = Mid(dt, 3, 2)
mm = Mid(dt, 5, 2)
dd = Mid(dt, 7, 2)
dateform = mm & "/" & dd & "/" & yy
End Sub

Apply the above conversion to the recordset behind a form (for example) [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top