SQL Server - Getting current DATE and Time in SQL

Asked By kush sehgal on 11-Oct-12 06:45 AM
Hello every one, Can we have function in MSSQL for getting current date and time,else using getdate() because it fetch our system date and time which can be changed. So i want to fetch current date and time in sql which cannot change,.
Robbe Morris replied to kush sehgal on 11-Oct-12 10:23 AM
SQL Server's time is taken from the system.  It does not have one of its own.
kush sehgal replied to Robbe Morris on 11-Oct-12 01:52 PM
this is my question.how can i get correct date and time in Sql with out fetching the system time by using getdate(). Because system time can be change.
Robbe Morris replied to kush sehgal on 11-Oct-12 02:11 PM
Everything that gets the current date/time gets it from the local system time.  If you are worried about the system time being changed, then you'll have to write code that gets the datetime from a remote source that you trust won't change.