convert concencated field to date

G

Guest

Hi

Any Ideas?

Concencate a number of imported fields into a date - Is is not possible to
import the fields as a number. Basically these are the date field from on on
line application
http://www.ukopforms.co.uk/ukop_application.asp

I have tried a number of things
DOB: (TableName!Day & TbaleName!Month & TableName!Year)
DOB: Val((TableName!Day) & Val(TbaleName!Month) & Val(TableName!Year))
DOB: #Val((TableName!Day) & Val(TbaleName!Month) & Val(TableName!Year))#
DOB: ((TableName!Day) &"/"& Val(TbaleName!Month) &"/"& Val(TableName!Year))
etc
etc

The 2nd trail will give a number
DOB: Val((TableName!Day) & Val(TbaleName!Month) & Val(TableName!Year))
But it will not convert this to number date

It is quite important as the 1st Name 2nd Name and DOB or the field used in
the lookup to check to see if this person already has a record. The code for
this is not important to this (and even I admit it's a little mad) but it
does mean that this has to be done in the query - not on the form.

Any help would be really nice

Thank you
 
R

Rob Parker

Hi Wayne,

The DateSerial function is your friend ;-)

Try this:
DOB:
DateSerial([TableName].[Year],[TableName].[Month],[TableName].[Day])

Note that Day, Month and Year are all reserved words, and should not be used
as field names (or for anything else).

HTH,

Rob
 
G

Guest

Thanks for that Rob

Will give it a try

Oh, the day month year thing was just for this post

Many thanks

--
Wayne
Manchester, England.



Rob Parker said:
Hi Wayne,

The DateSerial function is your friend ;-)

Try this:
DOB:
DateSerial([TableName].[Year],[TableName].[Month],[TableName].[Day])

Note that Day, Month and Year are all reserved words, and should not be used
as field names (or for anything else).

HTH,

Rob
 
G

Guest

Hi Rob

I tried your suggestion and it works prefectly. Many thanks

--
Wayne
Manchester, England.



Rob Parker said:
Hi Wayne,

The DateSerial function is your friend ;-)

Try this:
DOB:
DateSerial([TableName].[Year],[TableName].[Month],[TableName].[Day])

Note that Day, Month and Year are all reserved words, and should not be used
as field names (or for anything else).

HTH,

Rob
 

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