Saturday, February 25, 2012

problem with datetime datatype..

hi! can anybody pls. help me...is it posible for my 'date' column with datetime datatype to contain date only..without the date? any inputs will be greatly appreciated!!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)

No comments:

Post a Comment