javascript - Azure Mobile Services : Get Server DateTime and compare it -
I want to run a scheduled job every 10 minutes which will do the following: Check the tables records 'Has not been updated for 10 minutes.
How is it possible to compare the current server date to javascript?
Use the JavaScript date object. Creating a new date object without just the parameters will give you the date and time of the server. This will definitely be in GMT because all servers running the Azure on GMT, however, are aware of the clock drift. Each server can be a little away from the second time, so it can not be accurate when comparing time on the server.
var cutOfDate = new date (); You can also load a JavaScript data libraries like moments or something like if you need to format or evaluate too much dates.
There is only one stored procedure of another option that is asked to clean for you. Then the stored procedure can be used to determine the current date of GETDATE and if deleted based on it
Comments
Post a Comment