A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Convert Dates in Text Field to Date Field



 
 
Thread Tools Display Modes
  #1  
Old June 16th, 2008, 09:24 PM posted to microsoft.public.access.tablesdbdesign
JWeaver
external usenet poster
 
Posts: 90
Default Convert Dates in Text Field to Date Field

We are using a database that now has over 4000 records in it. When the
database was created (not by me), the majority of the date fields were
created as Text fields. Now, while trying to create a query to select data
from one of these date fields, I have encountered a problem in that the query
selects 2007 dates along with 2008 dates. Is there a way to convert these
Text fields to Date fields without losing the data? The date in one field in
particular is entered as "6/16/08 Mon". Alternatively, is there a way to
write the criteria for this field so that it excludes 2007 dates?

Your help would be appreciated.
--
JWeaver
  #2  
Old June 16th, 2008, 11:29 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Convert Dates in Text Field to Date Field

You provided a single example of what's been entered in a single field.

Are you looking for a "blanket" solution? If so, please provide a "blanket"
description (i.e., the variety, with examples).

You might want to take a look at the CDate() function in a query. It might
be able to convert some of your text strings to date equivalents in a query.
Then you could use the date/time value to compare to your selection
criteria.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"JWeaver" wrote in message
...
We are using a database that now has over 4000 records in it. When the
database was created (not by me), the majority of the date fields were
created as Text fields. Now, while trying to create a query to select
data
from one of these date fields, I have encountered a problem in that the
query
selects 2007 dates along with 2008 dates. Is there a way to convert these
Text fields to Date fields without losing the data? The date in one field
in
particular is entered as "6/16/08 Mon". Alternatively, is there a way to
write the criteria for this field so that it excludes 2007 dates?

Your help would be appreciated.
--
JWeaver



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.