I have a field in my table called capturedate which stores a float value which looks like something like this - 40821.28441
my t-sql code is like this:
declare @mypunchdate datetime;
set @mypunchdate = cast(capturedate as datetime);
this code converts the value to a datetime value fine - now what I need to do is before I pass @mypunchdate to my stored procedure I need to subtract 2 from it - so I need to add more code above so it takes that capturedate subtracts 2 and then I put it in my @mypunchdate variable.
What would the code look like to do this above?
Thanks so much in advance. I am lost when it comes to t-sql.