Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005

    Unanswered: problem with datetime datatype..

    hi! can anybody pls. help it posible for my 'date' column with datetime datatype to contain date only..without the date? any inputs will be greatly appreciated!!

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    if you are talking about microsoft sql server, the answer is no, you cannot have only a date without a time

    however, you can have a date with a midnight time, e.g. 2006-05-29 00:00:00

    use dateadd(d,datediff(d,0,getdate()),0)

    moving thread to microsoft sql server forum (if you're using some other database, please be sure to mention it) | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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