1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

SQL to get date from datetime field

Discussion in 'Database' started by Saloni Upadhyay, Jan 13, 2010.

  1. Saloni Upadhyay

    Saloni Upadhyay New Member

    Joined:
    Jan 13, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    select convert(varchar,Datecolumn,101)
    where
    101 ->mm/dd/yyyy
    108 ->hh:mm:ss
    103 ->dd/mm/yyyy

    Function for getting current date in sql --> getdate()
     
  2. SpOonWiZaRd

    SpOonWiZaRd Know what you can do.

    Joined:
    May 30, 2007
    Messages:
    747
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Network Engineer/Programmer
    Location:
    South Africa
    Welcome to G4E, is that a question?
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Moved to DB forum
     

Share This Page