Changes between Initial Version and Version 1 of Ticket #25487, comment 2
- Timestamp:
- Oct 1, 2015, 11:36:39 AM (9 years ago)
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: 1 I propose add special for PosgreSQL field, that will be using INTERVAL '''full'''. 2 3 Month is not a static value and you can't convert it to bigint. 4 For example: 5 {{{ 3 6 TIMESTAMP '2001-02-02' + INTERVAL '1 month' = TIMESTAMP '2001-03-02' 4 7 TIMESTAMP '2001-02-02' + INTERVAL '31' days' = TIMESTAMP '2001-03-05' 8 }}} 9 10 In python you must to use python-dateutil: 11 {{{ 12 >>> datetime(2015, 1, 31) + relativedelta(months=1) 13 datetime.datetime(2015, 2, 28, 0, 0) 14 >>> datetime(2012, 2, 29) + relativedelta(months=12) 15 datetime.datetime(2013, 2, 28, 0, 0) 16 }}}