Create Date Field from Text

  • Thread starter Thread starter aMack
  • Start date Start date
A

aMack

I have tried a number of things with no correct results.

I am running a series of queries pulling data based on 2 dates (Beg and End)

I want to create a temporary table from a simple query but cannot get the
results into a Date format.

In my MakeTable query, I have: BEG DATE: Format([ENTER BEG DATE],"dd-mmm-yy")

The results look correct but it is a text field - how do I make it a Date
format field?

Thanks
 
One approach would be to use the CDate() function in your query to "coerce"
the value into a Date/Time value.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
aMack said:
I have tried a number of things with no correct results.

I am running a series of queries pulling data based on 2 dates (Beg and End)

I want to create a temporary table from a simple query but cannot get the
results into a Date format.

In my MakeTable query, I have: BEG DATE: Format([ENTER BEG DATE],"dd-mmm-yy")

The results look correct but it is a text field - how do I make it a Date
format field?


Don't use the Format function, it always returns a text
string. Just use yout prompt string instead.

To make it look the way you want, use the Format PROPERTY of
the form or report text box that displays the date.
 
Back
Top