Changes between Initial Version and Version 1 of Ticket #25487, comment 2


Ignore:
Timestamp:
Oct 1, 2015, 11:36:39 AM (9 years ago)
Author:
None

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25487, comment 2

    initial v1  
    1 Month is not a static value that you can convert to bigint.
    2 See example:
     1I propose add special for PosgreSQL field, that will be using INTERVAL '''full'''.
     2
     3Month is not a static value and you can't convert it to bigint.
     4For example:
     5{{{
    36TIMESTAMP '2001-02-02' + INTERVAL '1 month' = TIMESTAMP '2001-03-02'
    47TIMESTAMP '2001-02-02' + INTERVAL '31' days' = TIMESTAMP '2001-03-05'
     8}}}
     9
     10In python you must to use python-dateutil:
     11{{{
     12>>> datetime(2015, 1, 31) + relativedelta(months=1)
     13datetime.datetime(2015, 2, 28, 0, 0)
     14>>> datetime(2012, 2, 29) + relativedelta(months=12)
     15datetime.datetime(2013, 2, 28, 0, 0)
     16}}}
Back to Top