Solved

How to change a Field Type in a query?

Posted on 2008-10-10
3
1,233 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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 120

Expert Comment

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

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

710 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