Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How i Can format Date in Sql Server 7.0

How i Can format Date in Sql Server 7.0

Scheduled Pinned Locked Moved Database
databasesql-serversysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    syed saba
    wrote on last edited by
    #1

    When iam extracting a date from SQL Svr 7 and i want it to be in a specific format, isn't there a SQL command that will do the formatting? system date '2004-06-09 13:43:41.363' i want this date in 'mm\dd\yy' format If so, could you give me the syntax and the associated style codes. Thanks syed saba

    H 1 Reply Last reply
    0
    • S syed saba

      When iam extracting a date from SQL Svr 7 and i want it to be in a specific format, isn't there a SQL command that will do the formatting? system date '2004-06-09 13:43:41.363' i want this date in 'mm\dd\yy' format If so, could you give me the syntax and the associated style codes. Thanks syed saba

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      this works on 2000 check it on 7 : select convert(varchar(10),DateValue,1)

      D 1 Reply Last reply
      0
      • H Hesham Amin

        this works on 2000 check it on 7 : select convert(varchar(10),DateValue,1)

        D Offline
        D Offline
        Dr_X
        wrote on last edited by
        #3

        I concur with hspc. There are about 20 options for formatting the date. Look at the help on convert in SQL which will give you the parameters and examples. Michael I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups