Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Converting text to datetime value 1

Status
Not open for further replies.

CzechNET

Programmer
Nov 2, 2004
28
0
0
CA
The DB I have to work with has 2 fields (among other) "fldSTIME text(8)" and "fldSDATE DateTime"

Now, I need to sort the records based on the date which works fine however I'd like to sort it by the fldSTIME as well, where the fldSTIME gets converted to time and attached to the fldSDATE.
The fldSTIME has values like '10:25 AM' OR '11:05 PM'. So the final sort query would hold a valid date time value assembled from the fldsDATE and fldSTIME.

Is it even possible ? Thanks in advance.
 
Oh, right .. MS SQL server, though I'd preffer if it was in ANSI SQL, not T-SQL
 
Thanks r937, works great on MSSQL. Do you know of equivalent for MS Access ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top