agentwalker
Programmer
in one of my tables there are two datetime fields.
One holds the date in the format of 25/08/2007 and the other holds just the time like so 13:25:00.
Now in the second table the date and time is all in one field like so
25 Aug 2007 13:25:00
What i'm trying to do so get the date and time out of the first table and compare it against the one in the second table.
The problems i'm having is due to the date and time being separated in the first table so i need to concatenate these two to compare against the other date.
Table1
-------
appDate | appTime
Table2
---------
AppDateTime
currently trying to concatenate like so:
WHERE Table1.appDate + ' ' + Table1.appTime = Table2.AppDateTime
But its not working, think that sql server is taking the date out of the first table and adding a 00:00:00:000 to the start which is screwing up the concatination.
ANy ideas
One holds the date in the format of 25/08/2007 and the other holds just the time like so 13:25:00.
Now in the second table the date and time is all in one field like so
25 Aug 2007 13:25:00
What i'm trying to do so get the date and time out of the first table and compare it against the one in the second table.
The problems i'm having is due to the date and time being separated in the first table so i need to concatenate these two to compare against the other date.
Table1
-------
appDate | appTime
Table2
---------
AppDateTime
currently trying to concatenate like so:
WHERE Table1.appDate + ' ' + Table1.appTime = Table2.AppDateTime
But its not working, think that sql server is taking the date out of the first table and adding a 00:00:00:000 to the start which is screwing up the concatination.
ANy ideas