"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Saturday, April 14, 2012

current time in sql and split time from datetime in sql

Hi all,
 Get current time and split time from datetime in sql

DEMO




SELECT CONVERT(varchar,GETDATE(),114) AS CurrentDate, CONVERT(varchar,convert(smalldatetime,'1/1/2007 7:00:00 PM'),114) AS TimeFromDate

If u had any trouble just ask, Happy to help u :) 
Stay Tune... 
Have a nice day... 'N happy Coding :)

No comments: