Hello,I'm trying to write a case statement for a datetime field to use the logdate as the datestamp when the time in logdate is equal to '00:00:00.000'Datestamp= case when LogDate like '% 00:00:00.000' then LogDate else DATEADD(day,-1,Datestamp) end The table looks likeDatestamp Logdate2015-09-30 00:00:00.000 2015-10-01 00:00:00.000But I would like it to populate as Datestamp Logdate2015-10-01 00:00:00.000 2015-10-01 00:00:00.000Thanks!
↧