Solved

How to change a Field Type in a query?

Posted on 2008-10-10
3
1,188 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:RalphHxyz
  • 2
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 22687167

select [Name], cdate([subDate])
from tableX
0
 

Author Comment

by:RalphHxyz
ID: 22687524
Thank you, what is cdate()?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 22687576
cdate(exp)  converts exp that can be interpreted as date to real date
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now