i am trying to compare a field with that has a timestamp with two fields one with the date the other with the time is there a function to combine them?
You can combine or concantenate columns (fields) in a query or T-SQL script. To provide the correct syntax, we need to know the data types and formats of the fileds or coulmns in the table.
For example, if the data types and formats are as follows...
Other data types and formats may require the use of the CONVERT function.
BTW: If field1 is a timestamp data type as you mentioned, you cannot compare it to dates and times as the timestamp data type doesn't really hold date and time data. It is simply a binary field, guaranteed to be unique. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time. NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
Be careful - timestamp is not the same as a date and time. At least when I tried to implement it, the timestamp starts at 0 and all entries after that receive the amount of time after the first entry and no date. So if I entered the first one, and then a second one a second later, the timestamp for the second one was 00.00.01 and not the date and time of the entry. Maybe I didn't do something right, but that's what I encountered using 7.0.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.