shinodmp
asked on
how can i remove the time from getdate using with out substring?
how can i Remove time from GetDate() without using substring
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://sqljunkies.com/HowTo/6676BEAE-1967-402D-9578-9A1C7FD826E5.scuk
SQL Server does not have separate data types for date and time. If you want to split the date and time separately then you have to convert datetime into varchar datatype.
Date:
select convert(varchar,getdate(), 101)
Time:
select convert(varchar,getdate(), 108)
For more conversion format visit the following link,
http://msdn.microsoft.com/en-us/library/ms187928.aspx
Date:
select convert(varchar,getdate(),
Time:
select convert(varchar,getdate(),
For more conversion format visit the following link,
http://msdn.microsoft.com/en-us/library/ms187928.aspx