Stairway to Advanced T-SQL Level 8: Functions to Generate Date and Time values

  • Greg Larsen

    SSC-Insane

    Points: 20585

    Comments posted to this topic are about the item Stairway to Advanced T-SQL Level 8: Functions to Generate Date and Time values

    Gregory A. Larsen, MVP

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Great article. I didn't know anything about the "...FROMPARTS" keywords.

  • cjackson 63531

    Valued Member

    Points: 52

    Good article and could have used the DATEFROMPARTS function just yesterday (but I scripted a work around).

    A good addition to this would be a discussion of whether or not T SQL can created a DATEFROMPARTS with leading zeros for 1 digit months and/or days.

    Thanks.

    C Jackson

  • mspurlock

    Valued Member

    Points: 64

    Love these topics.

    Did hit a syntax issue with this:

    SELECT SYSUTCDATETIME() AS "UTC Time",

    SYSDATETIME() AS "Local Time"

    DATEADD(HH,-7,SYSUTCDATETIME()) AS "Calculate Local Time";

    Needed a comma.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply