Function | Result | Return type |
---|---|---|
GETDATE() | 2013-02-26 20:54:24.057 | DATETIME |
CURRENT_TIMESTAMP | 2013-02-26 20:54:24.057 | DATETIME |
GETUTCDATE() | 2013-02-26 20:09:17.467 | DATETIME |
SYSDATETIME() | 2013-02-26 21:09:17.4680514 | DATETIME2 |
SYSUTCDATETIME() | 2013-02-26 20:09:17.4680514 | DATETIME2 |
SYSDATETIMEOFFSET() | 2013-02-26 21:09:17.4680514 +01:00 | DATETIMEOFFSET |
UTC means Coordinated Universal Time and is widely used as time standard in web applications. The result above were taken on a PC with the time zone (UTC+01:00). Note that the UTC functions return the time one hour before the rest.
CURRENT_TIMESTAMP is the recommended one as it is the ANSI equivalent of GETDATE()
Don't forget that if you only need the current DATE or TIME, you can cast the return of the above functions to a DATE or TIME
Example:
SELECT CAST(GETDATE() as DATE)
which will return
2013-02-26
For all DateTime functions visit the following link
ReplyDeleteشركة شحن عفش من جدة الى الاردن
شركة شحن عفش من الرياض الى الاردن
شركة نقل عفش من الرياض الى الدمام
افضل شركة نقل عفش من الرياض الى جدة
شركة نقل عفش من الرياض الى المدينة المنورة
ارخص شركة نقل عفش
ReplyDeletePackers And Movers Bangalore Local Household Shifting Service, Get Free Best Price Quotes Local Packers and Movers in Bangalore List, Compare Charges, Save Money And Time at
Local Packers And Movers Bangalore
Packers and Movers Gurgaon Provide Reliable, Safe and Certified Service Provider list, Get Free ***Best Price Quotaition and Compare Charges. ???Hassle free Household Shifting Services, High Quality packing Material, Office Relocation, Car Transportaion, ###Local and Domestic Shifting Service @
ReplyDeletePackers And Movers Gurgaon
Packers and Movers Hyderabad Give Certified and Verified Service Providers, Cheap and Best ###Office Relocation Charges, ***Home Shifting, ✔✔✔Goods Insurance worth Rs. 10,000, Assurance for Local and Domestic House Shifting. Safe and Reliable Household Shifting Services in Hyderabad with Reasonable Packers and Movers Price Quotation @ Packers And Movers Hyderabad
ReplyDeletePackers and Movers Pune Provide High Quality ***Household Shifting, Home/Office Relocation, Insurance, Packing, Loading, ###Car Transportation Service Pune and High experiences, Top Rated, Safe and Reliable, Best and Secure Packers and Movers Pune Team List. Get ✔✔✔Affordable Rate Charts and Compare Quotation and Save Money and Time @ Packers And Movers Pune
ReplyDelete