On Tuesday, October 3, 2017 at 2:38:38 PM UTC-7, Jim S wrote:
>
> Stifan
>
> I use that method to build dates quite often.  However, I don't know how 
> to translate that into a DAL query.
>
> -Jim
>
>
I have an example, but it's at home.

/dps
 

> On Tuesday, October 3, 2017 at 4:18:30 PM UTC-5, 黄祥 wrote:
>>
>> perhaps you can use python datetime module.
>> e.g.
>> import datetime
>> print (datetime.date.today() + datetime.timedelta(1*365/12)).isoformat()
>>
>> or
>>
>> from datetime import date
>> from dateutil.relativedelta import relativedelta
>> six_months = date.today() + relativedelta(months=+1)
>>
>> The advantage of the latest approach is that it takes care of issues with 
>> 28, 30, 31 days etc.
>>
>> best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to