converting to date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

My table is structured as follows:

Series ID Year Period Value

All of the data is text and the year is in the standard yyyy format, but the period data is as follows: M01, M02, M03... (and the period are not always contiguous)

I want to be able to produce output that combines the year and period in order to have a regular formatted date like 01/2004. My ideal output would be
Series ID Date Value (with date in a date format)

Any suggestions for how I should go about doing this?
 
Use a Calculated Field in your Query:

SpecialDate: Right([Period], 2) & "/" & [Year]

Note: "Year" is not a good choice for a Field name. There
is a function Year() and it can get a bit confusing later.

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
Hello,

My table is structured as follows:

Series ID Year Period Value

All of the data is text and the year is in the standard
yyyy format, but the period data is as follows: M01, M02,
M03... (and the period are not always contiguous)
I want to be able to produce output that combines the
year and period in order to have a regular formatted date
like 01/2004. My ideal output would be
 
Try
Dateserial([Year],Mid(Period,2),1)

HTH
Pieter

Aja said:
Hello,

My table is structured as follows:

Series ID Year Period Value

All of the data is text and the year is in the standard yyyy format, but
the period data is as follows: M01, M02, M03... (and the period are not
always contiguous)
I want to be able to produce output that combines the year and period in
order to have a regular formatted date like 01/2004. My ideal output would
be
 
Back
Top