I
ImAimo
Guest
I have imported a text file into a Access database using Access 97. The file I brought is was comma delimited. The date though is in the yymmdd format. I would like to have it in the mmddyyyy format. I first need to change it to mmddyy then make it a long date, I am assumming. Through my research I found some help onMicrosofts web page. It told me to make a new module with the following
Function MakeUSDate(x As Variant)
If Not IsDate(x) Then Exit Function
MakeUSDate = "#" & Month(x) & "/" & Day(x) & "/" & Year(x) & "#"
End Function
I put it in as a new module and saved it as NewDate. I then made a query and put the birthday in the first row and the following in the second row
Expr1: MakeUSDate([Birthday])
Then I hit the red exclamation point and ran the query. It returned the old birthday, but did not put anything in the new catagory.
If I retype the date in the old field it will convert it to the new date. I was hoping to have access do this automatically.
I am NEW to this program and any help you can give me will be greatly appreciated. I have no experiene with modules or SQL or any of that.
Thanks,
Amy
Function MakeUSDate(x As Variant)
If Not IsDate(x) Then Exit Function
MakeUSDate = "#" & Month(x) & "/" & Day(x) & "/" & Year(x) & "#"
End Function
I put it in as a new module and saved it as NewDate. I then made a query and put the birthday in the first row and the following in the second row
Expr1: MakeUSDate([Birthday])
Then I hit the red exclamation point and ran the query. It returned the old birthday, but did not put anything in the new catagory.
If I retype the date in the old field it will convert it to the new date. I was hoping to have access do this automatically.
I am NEW to this program and any help you can give me will be greatly appreciated. I have no experiene with modules or SQL or any of that.
Thanks,
Amy