converting to date

A

Aja

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?
 
V

Van T. Dinh

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
 
P

Pieter Wijnen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top