SQLAlchemy doesn’t yet have date arithmetic functions built in to the point 
that we abstract away the underlying database features.

Date arithmetic currently relies on the end-user implementing the SQL using 
exactly the functions that the target database expects.  These vary completely 
on all backends and there’s almost no overlap in functionality.

so the answer here is 100% different depending on database in use (pg, mysql, 
sqlite, mssql, oracle, etc)




On Nov 27, 2013, at 8:59 PM, Chung WONG <wch...@gmail.com> wrote:

> Hi list,
> 
> currently I have two fields:
>     START = Column(DateTime,default=func.now())
>     END = Column(DateTime,default=func.now() + 30 )
> apparently the default syntax in END field is not correct.
> 
> How do I set the default value of END field, say 30 days after the value of 
> START field?
> 
> thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to