Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert string field to date via sql

Status
Not open for further replies.

gabeshackle

Computer
Feb 4, 2002
1
I have a data field that is a type text in an existing database containing dates in the format mm/dd/yyyy and I'm trying to order the records by that field as a date. Is there anyway to convert this field to a date within the sql statement and then base the order off of that? Thanks.
 
Replies continue below

Recommended for you

Dear gabeshackle,

I am not sure of the database you are using, but most of the database has function to convert one datatype to another. like to_date() in oracle, format() in Access. If the information are not sufficient please feel free to mail me at simp_raman@rediffmail.com , meanwhile update the information here for the benifit of other members.

With regards,
Raman
 
To use a SUM-Operation in a query it is necessary for me to convert the attribute from data type "char" to another (integer).

How is the syntax for this conversion (convert(char,??)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor