Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Search

XML Feeds

Google Ads

« Compound Operators Or How T-SQL Is Morphing Into VB Or C#SQL Server 2008 Release Candidate 0 Available To The General Public »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

I saw microsecond and nanosecond already in CTP5 but this is the first time I have seen ISO Week (ISO_WEEK) and Time Zone Offset(TZoffset), maybe I haven’t looked hard enough :-)

Here are the datepart and abbreviations you have to use for the 4 new oness

microsecond mcs
nanosecond ns
TZoffset tz
ISO_WEEK isowk, isoww

ISO_WEEK datepart ISO 8601 includes the ISO week-date system, a numbering system for weeks. Each week is associated with the year in which Thursday occurs. For example, week 1 of 2004 (2004W01) ran from Monday 29 December 2003 to Sunday, 4 January 2004. The highest week number in a year might be 52 or 53.

TZoffset The TZoffset (tz) is returned as the number of minutes (signed). The following statement returns a time zone offset of 310 minutes.
SELECT DATEPART (TZoffset, 2007-05-10 00:00:01.1234567 +05:10);

If the datepart argument is TZoffset (tz) and the date argument is not of datetimeoffset data type, NULL is returned.

About the Author

User bio imageDenis has been working with SQL Server since version 6.5. Although he worked as an ASP/JSP/ColdFusion developer before the dot com bust, he has been working exclusively as a database developer/architect since 2002. In addition to English, Denis is also fluent in Croatian and Dutch, but he can curse in many other languages and dialects (just ask the SQL optimizer) He lives in Princeton, NJ with his wife and three kids.
Social SitingsTwitterFacebookLinkedInHomePageLTD RSS Feed
1207 views
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

1 comment

Comment from: onpnt [Member] Email
All I know is gmmastros will have a new goal in mind. 100ns or less instead of his long running 100ms or less queries ;)
06/12/08 @ 11:27

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)