Just how do I obtain the current day as well as previous date in SQL?

Category: Windows Server

To obtain the other day’s time, you need to have to subtract 1 day from today’s date. Use GETDATE() to acquire today’s time (the kind is actually datetime) as well as cast it to day. In SQL Server, you can easily deduct or include any sort of lot of times utilizing the DATEADD() functionality. The DATEADD() functionality takes 3 debates: datepart, amount, and time.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: