Using GetDate() function User can get Today's date and time in SQL Server 2012.
select GetDate() "Today's Date and Time"
Today's Date and Time
2013-04-25 23:13:11.143
Format: yyyy-MM-dd HH:mm:ss.fff
yyyy -> 4 digit year
MM -> 2 digit Month
dd -> 2 digit date
HH -> 24-hr format Hour
mm-> 2 digit minutes
ss -> 2 digit seconds
fff -> fraction of seconds/Milli seconds
Note: Format Specification is case sensitive.
Tags: SQl Server Get Today's date and time, Get Today's date in SQL Server, Get Time in sql server,
Get Today's date and time in sql server,Get current date and time in SQL Server.
No comments:
Post a Comment