I have a system which stores a date value (Date1) and a time value (From Time) in separate fields and I need to work with the full date/time result (FromDT). How can I add these two values together as this seems to be unsupported by T-SQL?
I also have other time fields ([To Time] & [Break]) which allow me to determine the end date/time (EndDT) by using [Date1] unless [To Time] is less than [From Time] + [Break], in which case [Date1] + 1 day.
All very difficult when (apparently) T-SQL doesn't support adding of dates and/or times together.
{Edit}Apologies for not stating earlier, but I'm using SQL Server 2012-R2.
I also have other time fields ([To Time] & [Break]) which allow me to determine the end date/time (EndDT) by using [Date1] unless [To Time] is less than [From Time] + [Break], in which case [Date1] + 1 day.
All very difficult when (apparently) T-SQL doesn't support adding of dates and/or times together.
{Edit}Apologies for not stating earlier, but I'm using SQL Server 2012-R2.
Comment