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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|