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 like
Datestamp Logdate
2015-09-30 00:00:00.0002015-10-01 00:00:00.000
But I would like it to populate as
Datestamp Logdate
2015-10-01 00:00:00.0002015-10-01 00:00:00.000
Thanks!