Golipz
Golipz

Reputation: 53

From where does the date in GETDATE() function comes from?

Does Anyone know from where GETDATE() gets the DATE itself?

Upvotes: 3

Views: 1062

Answers (1)

DineshDB
DineshDB

Reputation: 6193

Good Question.

The GETDATE() function get the DATETIME from the server which is connect.

If you connect you localhost then get it from your local machine.

Otherwise you connect any server, it get the DATETIME from the SERVER you are connect.

Hope this helps you:

You can use DATEADD function:

SELECT DATEADD(DAY,3,GETDATE())

Upvotes: 4

Related Questions