Setting date to dd.mm.yyyy

Asked by maddus

Hi,
in a quotation email I use ${object.date_order} but it is yyyy-mm-dd and I want to change it to dd.mm.yyyy. How can I do this?

Greetings
maddus

Question information

Language:
English Edit question
Status:
Solved
For:
Power Email Edit question
Assignee:
No assignee Edit question
Solved by:
maddus
Solved:
Last query:
Last reply:
Revision history for this message
Husen Daudi (husendaudi) said :
#1

you can try this.
${time.strfrime(object.date_order,'%d.%m.%Y')}

I never used power mail, hope this will help.

Revision history for this message
maddus (maddusito) said :
#2

Hi thanks for your answer,

while you where answering I got the answer by myself. It is a little bit dirty, but it works.

<%
    b = object.date_order.split('-',3);
    object.date_order = b[2] + '.' + b[1] + '.' + b[0]
%>

And with this I get my dd.mm.yyyy pattern. Thanks anyway for your answer...

Greetings
maddus