Link to home
Start Free TrialLog in
Avatar of RalphHxyz
RalphHxyzFlag for United States of America

asked on

How to change a Field Type in a query?

I have Access Table with columns [Variable] and [Contents]
Contents is of Type Text
I could have this data in my table:

Variable  | Contents
Name      | Joe
SubDate | 10/1/2008
Name     | Mary
SubDate | 10/5/2008
Name     | Tom
SubDate | 10/2/2008
I need to query for SubDate but convert the results to DateTime.
Is such a query possible?
If not what might be a work around?
I have thought of using a compound query that first appends SubDate to a Temp table TempDates
and then joins TempDates.SubDate to another query returning SubDate as a DateTime.
This is trying to populate a GridView from a date range and it seems I need to be using DateTime
and not Text for SubDate.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RalphHxyz

ASKER

Thank you, what is cdate()?
cdate(exp)  converts exp that can be interpreted as date to real date