I am currently dealing with a slightly strange relation layout. The relation contains several fields, two of them, datetimeA and datetimeB are used to hold a datetime value.
I am not sure why it was set up this way, but datetimeA is used to store the date components with all of the time components being 00:00:00.0 while datetimeB is used to store the time component with all of the date components as 1970-01-01.
I am creating a simple reporting interface which uses this table and I need to extract the date from datetimeA, the time from datetimeB and join them into a new datetime. If possible I would like to make this happen in the query run against the database.
An ideal solution would be something similar to the datepart function but with 'date' and 'time' parts.