Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Formatting Question 1

Status
Not open for further replies.

kentwoodjean

Technical User
Oct 19, 2002
376
US
Have text files that import with a date field like 200509 or 200510. I have always changed the appearance to 2005/09 by using: WkDate: Left([Date],4) & "/" & Right([Date],2).

Now I find I have to combine it with some other queries that have the date format of 10/20/2005.

I have checked different posts and tried several different formatting ideas but having no luch in changing the format to something like 10/01/2005. Using the 1st of each month would work perfectly for my monthly report.

Any quick ideas?
 
You could convert your text to a real date using:
RealDate: CDate(Mid([Date],5,2) & "/01/" & Left([Date],4))

You never said if the other date is actually a date data type, only the format of 10/20/2005 which might again be a text field.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Your suggestion works just as I wanted it too. I had tried something very close to what you provided but was missing the MID. Thanks for your quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top