In my application, I am using my application to retrieve the date information from the server. e.g:1533675600000. How do I get today's raw date number in this way? Every day, I want to refresh this daily raw date information and show only the information that matches the date of that day on my screen. So I ask you, how do I convert the date information I received with the new Date () function to the raw form of numbers in this way?
40410
Something similar to Unix's timestamp, that is a single number that represents the current time and date. Either as a number or a string.
87792
I asked  yesterday, approximately 18 hours ago ("2011-12-13 20:24:03Z" according to the hover text), and it's still being displayed as "today".  I assume the "Z" in the timestamp refers to Zulu time, so I , and the date (2011-12-14) differs from the timestamp on the question.  I don't pretend to understand all of the complexities when converting time zones, but I thought it was strange enough to report. If it matters at all, I'm in US-Eastern.
1023
I've seen this in a few   function fn() {     return +new Date; }   And I can see that it is returning a timestamp rather than a date object, but I can't find any documentation on what the plus sign is doing.  Can anyone explain?
99429
Is there a fairly easy way to convert a datetime object into an RFC 1123 (HTTP/1.1) date/time string, i.e. a string with the format  Sun, 06 Nov 1994 08:49:37 GMT   Using strftime does not work, since the strings are locale-dependant. Do I have to build the string by hand?
36605
Looking at , I see "asked yesterday" (which I really hate; I'd like to see an exact time specification rather than this vague one, especially in the list of questions). But it was not asked yesterday! When I hover over it to show the exact time, it shows it was actually the day before yesterday!  This snapshot was taken at 2012-03-31 15:00 UTC (plus or minus a few minutes):    Whatever different opinions you may have on the implementation, yesterday is a word with a certain meaning. Redefining it is not a good idea. At least rephrase this as "1 day ago" or something.
7708
How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?
73750
I need to find out how to format numbers as strings. My code is here:  return str(hours)+":"+str(minutes)+":"+str(seconds)+" "+ampm   Hours and minutes are integers, and seconds is a float.  the str() function will convert all of these numbers to the tenths (0.1) place.  So instead of my string outputting "5:30:59.07 pm", it would display something like "5.0:30.0:59.1 pm".  Bottom line, what library / function do I need to do this for me?
105204
Given a date/time as an array of (year, month, day, hour, minute, second), how would you convert it to epoch time, i.e., the number of seconds since 1970-01-01 00:00:00 GMT?  Bonus question: If given the date/time as a string, how would you first parse it into the (y,m,d,h,m,s) array?
67697
I have tried using =TEXT(Today,"mm-dd-yyyy hh:mm:ss") but that only returns the 5/5/55 00:00:00, it won't give the time. How do I get both the date and time with a calculated formula?
49877
I'm trying to use the date command to generate a file timestamp that the date command itself can interpret.  However, the date command does not seem to like its own output, and I am not sure how to work around this.  Case in point:  sh-4.2$ date Fri Jan  3 14:22:19 PST 2014 sh-4.2$ date +%Y%m%dT%H%M 20140103T1422 sh-4.2$ date -d "20140103T1422" Thu Jan  2 23:22:00 PST 2014   date appears to be interpreting the string with an offset of 15 hours.  Are there any known workarounds for this?  Edit: this is not an issue of display:  sh-4.2$ date +%s 1388791096 sh-4.2$ date +%Y%m%dT%H%M 20140103T1518 sh-4.2$ date -d 20140103T1518 +%s 1388737080 sh-4.2$ python Python 3.3.3 (default, Nov 26 2013, 13:33:18)  [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; 1388737080 - 1388791096 -54016 &gt;&gt;&gt; 54016/3600 15.004444444444445 &gt;&gt;&gt;    It's still off by 15 hours when displayed as a unix timestamp.    EDIT #1  Maybe I should pose this question a little differently.  Say I have a list of ISO8601 basic timestamps of the form:   YYYYMMDDThhmm YYYYMMDDThhmmss   What is the simplest way to convert them to the corresponding Unix timestamps?   For example:  - 20140103T1422   = 1388787720 - 20140103T142233 = 1388787753
13684
I want to convert a string like this:  '10/15/2008 10:06:32 PM'   into the equivalent DATETIME value in Sql Server.  In Oracle, I would say this:  TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM')    implies that I must parse the string into one of the , and then convert using one of those codes.  That seems ludicrous for such a mundane operation.  Is there an easier way?
81419
Is it possible to use the =today() function (or something else) to insert the current date but then not update each time the file is opened?  I want to create a numbers template for my invoices. I'd like it to auto fill invoice date and date due then, when I save the document, store the values, not the function.
11639
In the footer of my page, I would like to add something like "last updated the xx/xx/200x" with this date being the last time a certain mySQL table has been updated.  What is the best way to do that?  Is there a function to retrieve the last updated date? Should I access to the database every time I need this value?
48731
I need to determine the current year in Java as an integer. I could just use java.util.Date(), but it is deprecated.
56250
I'm new to filtering dates with REST in SP but am trying to do something like below but am not sure how to get today's date in as a variable into the request. I don't think I'm too far off so any help is greatly appreciated.       var today = new Date();     $.ajax({         url: "/_api/web/lists/GetByTitle('DateItems')/items?$orderby=SortOrder asc&amp;$filter=StartDate le datetime'" + today + "' and EndDate ge datetime'" + today + "'",         ...     });
107508
I am working on a form widget for users to enter a time of day into a text input (for a calendar application). Using JavaScript (we are using jQuery FWIW), I want to find the best way to parse the text that the user enters into a JavaScript Date() object so I can easily perform comparisons and other things on it.  I tried the parse() method and it is a little too picky for my needs. I would expect it to be able to successfully parse the following example input times (in addition to other logically similar time formats) as the same Date() object:   1:00 pm 1:00 p.m. 1:00 p 1:00pm 1:00p.m. 1:00p 1 pm 1 p.m. 1 p 1pm 1p.m. 1p 13:00 13   I am thinking that I might use regular expressions to split up the input and extract the information I want to use to create my Date() object. What is the best way to do this?
81270
I'd like to be able to print text that varies depending on whether the date matches a given date string  For example  suppose there was a command   \iftoday#1#2#3   which printed #2 if \today matched the string in #1 and #3 otherwise.  So a sample of my proposed usage would be:     \iftoday{February 3, 2016}{There's no garbage today}{Please put out the garbage}    I've tried various commands like pdftexcmd's strcmp, to no avail.    I suspect the problem may have to do with matching the string generated by \today.    While on screen it appears that \today returns February 3, 2016. I can't get it to match February 3, 2016 when I compare strings.  Obviously, I'd be perfectly happy if I could get this to work by represent today's date in any of the standard date formats.  Thanks very much in advance for any suggestions.