![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Mon, May 11 2015 11:58 PM | Permanent Link |
Adam H. | Hi,
I have a situation where I have data in two seperate fields, one as a date field, and the other as a time field. I would like to create a query which combines both of these with a result in a TimeStamp field, but have been struggling with this: I have tried the following, all without success: Select DateField + TimeField Select Cast(DateField as TimeStamp) + TimeField Select Cast(DateField as TimeStamp) + Cast(TimeField as TimeStamp) Does anyone know of a way in DBISam to combine date and time fields together using SQL? Thanks & Regards Adam. |
Tue, May 12 2015 2:38 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Adam
From creaking memory I think you have to form the Timestamp before casting it so untested CAST(CAST datefield AS VARCHAR(10))+' '+CAST(timefield as VARCHAR(10)) AS TIMESTAMP) Roy Lambert |
Tue, May 12 2015 3:21 AM | Permanent Link |
Adam H. | Hi Roy,
> From creaking memory I think you have to form the Timestamp before casting it so untested > > > CAST(CAST datefield AS VARCHAR(10))+' '+CAST(timefield as VARCHAR(10)) AS TIMESTAMP) Yup - that appears to be what I need to do. Thanks very much for your help! Cheers Adam. |
This web page was last updated on Monday, July 14, 2025 at 02:20 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |