It is currently Tue May 22, 2012 10:45 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Date display format in report
PostPosted: Wed Apr 06, 2011 9:07 am 
Offline

Joined: Tue Jan 04, 2011 5:45 pm
Posts: 12
Hi All,

In a Quotation/Order
Code:
[[ formatLang(o.date_order,date = True) ]]

shows the date of creating the order, I tried to make it diplsaying the year only but did not succeed. Can any one help me out?

Thanks!


Top
 Profile  
 
 Post subject: Re: Date display format in report
PostPosted: Fri Apr 15, 2011 12:16 pm 
Offline

Joined: Tue Jan 04, 2011 5:45 pm
Posts: 12
Back again...and got it solved after 'some' trial & error:

Code:
[[ time.strftime('%Y', time.strptime(o.date_order, '%Y-%m-%d')) ]]


Works fine, I use it to display the validity of a quote (valid for orders placed in the same year).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP