I'm trying to figure out how to increment dates in JAVA.  The date I'm trying to increment is, 2012-10-01.  The following represents the increments:   2012-10-01 - 2013-09-30 2013-10-01 - 2014-09-30 2014-10-01 - 2015-09-30 2015-10-01 - 2016-09-30
1510
I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?
18574
I'm trying to convert a date string into an age.  The string is like: "Mon, 17 Nov 2008 01:45:32 +0200" and I need to work out how many days old it is.  I have sucessfully converted the date using:  &gt;&gt;&gt; time.strptime("Mon, 17 Nov 2008 01:45:32 +0200","%a, %d %b %Y %H:%M:%S +0200") (2008, 11, 17, 1, 45, 32, 0, 322, -1)   For some reason %z gives me an error for the +0200 but it doesn't matter that much.  I can get the current time using:  &gt;&gt;&gt; time.localtime() (2009, 2, 3, 19, 55, 32, 1, 34, 0)   but how can I subtract one from the other without going though each item in the list and doing it manually?
11883
How can I format a date as dd/mm/yyyy or mm/dd/yy ?   Like in VB format("dd/mm/yy",now)  How can I do this in C#?
86183
I  have Linux ( RH 5.3) machine  I need to add/calculate 10 days plus date so then I will get new date (expiration date))  for example   # date   Sun Sep 11 07:59:16 IST 2012   So I need to get        NEW_expration_DATE = Sun Sep 21 07:59:16 IST 2012   Please advice how to calculate the new expiration date ( with bash , ksh , or manipulate date command ?)
37695
in a file containing :  ... 18-11-2018:othercharacters 10-11-2018:othercharacters 03-10-2018:othercharacters 30-10-2018:othercharacters 27-09-2018:othercharacters 03-12-2018:othercharacters ...   the command :  sort -t- -k2 -k1    does not sort by date, what am I missing ?
3855
I need a method for adding "business days" in PHP. For example, Friday 12/5 + 3 business days = Wednesday 12/10.  At a minimum I need the code to understand weekends, but ideally it should account for US federal holidays as well. I'm sure I could come up with a solution by brute force if necessary, but I'm hoping there's a more elegant approach out there. Anyone?  Thanks.
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
116559
I need to decrement a Javascript date by 1 day, so that it rolls back across months/years correctly.  That is, if I have a date of 'Today', I want to get the date for 'Yesterday'.  It always seems to take more code than necessary when I do this, so I'm wondering if there's any simpler way.    What's the simplest way of doing this?  [Edit: Just to avoid confusion in an answer below, this is a JavaScript question, not a Java one.]
94071
How do I get the difference in days between 2 dates in SQLite? I have already tried something like this:  SELECT Date('now') - DateCreated FROM Payment   It returns 0 every time.
98639
Here is my scenario:  I have to populate list with dates and some metadata of upcoming events for the following year in my Excel application. Some of the events are occurring on the same day each month, e.g. the 3rd day of month.  So the question is:  Is there any function so that I can add one month to given date, like:  cell A1: 1/23/2013 cell A2: 2/23/2013 cell A3: 3/23/2013   What did not work: Apparently A3=$A2+30 produces 3/25/2013 which is wrong.
56183
Which is the correct form on an invoice, or a general date range in a form, and why?  Monkey dolls                        12 GBP From 2012-01-03 to 2013-01-02  Monkey dolls                        12 GBP Since 2012-01-03 until 2013-01-02   Form format (dates can be modified with a datepicker):  Since: 2012-01-03 until: 2013-01-02   Since+until makes sense and sounds ok to me, yet I know I can be very wrong, at least when it comes to the common usage in the UK and/or US, since English is not my first language.  I am interested in both British and American English.  Until now I've been using since+until, yet some articles explicitly say they may not ever be used together, while some people and some other articles get deep into grammar rules which I can't really apply on the context of invoices and forms.  Here's a recent article saying since and until can never be used together (last paragraph):   Edit: The date range can start in the past or in the future, and can end in the past or in the future. However, at the time of issuing an invoice or rendering a form, you cannot know when the document will be read or how the form will be filled.
23405
I have a CSV file that has dates written like this: 250909,240909 and they get stored in a SQL Server database as varchars.  How do I get it to convert them into dates so that it gets displayed like this: 25/09/09, using the dd/mm/yyyy format?  At the moment I can get it to convert, but it converts it like this: 2025/09/09, meaning it is using the yyyy/mm/dd format which is wrong, seeing that the first column is the day and second the month and third the year.
102155
Background When a date is to be shown that is from this year it is shown as &quot;Mar 12&quot; for the &quot;12th of March&quot; rather than &quot;Mar 12 '14&quot;. While the full form is not what I'm used to (as a European) it is at least unambiguous. However &quot;Mar 12&quot; reads as &quot;March 2012&quot; to me and confuses me every time. Although I have (after months of pain) stopped misreading it I still feel the Parse Error: Needs Stack Exchange Mode and the slight pause as my brain tried to reparse it. The most recent example of someone confused by this is here . I was myself caught by this . Feature request Even for recent dates; once the date is shown at all show the full date including the year. So this post was posted on Mar 22 '14. This seems to have no downsides as it takes no extra space (there needs to be space for the long form anyway) and is much clearer to those of us who don't use an American date system.
99127
Is there a function or method to give the last day of a month? For example if the date is 27 feb 2013, the last date should be 28 feb 2013 , it become 29 if its a leap year. if the date was 2 jan then it should return 31 Jan.  If there is no function then any ideas on how we can get this?  Thanks
67323
Why is a signed integer used to represent timestamps? There is a clearly defined start at 1970 that's represented as 0, so why would we need numbers before that? Are negative timestamps used anywhere?
9299
Given a start date of 1/1/2009 and an end date of 12/31/2009, how can I iterate through each date and retrieve a DateTime value using c#?  Thanks!
45640
I have some issues about choosing how to align a Date/time data type in a field. Which is the best way to align this type of date and why? Right or left? P.S We use WPF.  [------25.03.2015] or [25.03.2015------]  Thank you :)