Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    212

    Unanswered: how to get System date in SQL

    how to get the system date or time in any format through SQL?

  2. #2
    Join Date
    Sep 2003
    Location
    Germany
    Posts
    63
    Hi there,

    think it should be

    select getdate()

    Carsten

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    To get it to a different format, use the CAST or CONVERT functions.

    blindman

  4. #4
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Originally posted by blindman
    To get it to a different format, use the CAST or CONVERT functions.

    blindman
    Or

    DATENAME ( datepart , date ), DATEPART ( datepart , date )

  5. #5
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Originally posted by snail
    Or

    DATENAME ( datepart , date ), DATEPART ( datepart , date )
    Or select GETUTCDATE() - Greenwich Mean Time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •