var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Convert text to a date
I am relatively new to using Access and have run into a problem. I am importing a spreadsheet that shows a date field in the following format:
What this means is that it is January 31. The 102 is meaningless. I want to reformat the field to display as 01/31/2002. I am trying to build an expression to do this. So far I have come up with:
NewDate: Right([Date Stamp],4) & "2002"
My expression displays this:
The next step is to format this into a proper date format. Plus I would really like my expression to show the current year. Don't want to hard code the year like I am presently doing. Help!
Last edited by Susan; 01-31-02 at 15:53.
If your year is formatted the same each time. You can do this.
Function NewDate(strDate As String) As Date
Dim strDate As String
NewDate = CDate(Mid(strDate, Len(strDate) - 3, 2) & "/" & Right(strDate, 2) & "/" & Year(Date))