Create Date Field from Text

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
 
J

Jeff Boyce

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.
 
M

Marshall Barton

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.
 

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

Similar Threads


Top