SHARE
TWEET

Untitled

a guest Jun 17th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with jul_dat as
  2. (
  3.     select dd1 / 1000 yyyy,
  4.            dd1 % 1000 days_since_1,
  5.            cast( cast(dd1 / 1000 as varchar) + '-01-01' as datetime) jan_1_of_year
  6.     from
  7.     (
  8.         select 9999999 - @dat dd1
  9.     ) x
  10. )
  11. select jan_1_of_year + days_since_1 - 1 from jul_dat
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top