Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I have time in the Integer Field ( The Field Represents milliseconds Past Midnight w.r.t GMT ) I want to have a function so that I can pass this integer field to the function and get the DATETIME Value. In that function I want to code it for Day light Saving time also How to get First Sunday of APRIL and Last Sunday of OCTOBER Eg ms past midnight w.r.t 47602656 SELECT 47602656 , DATEADD(hh , -5 , DATEADD(MS, 47602656 , CONVERT(VARCHAR(10), GETDATE(), 101)) ) Thx Venu
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts
Posted - 2006-03-09 : 13:57:46
This should do it. Function F_START_OF_WEEK is available in Script Library forum.