Date Format wrong

rinkelzz

Member
I have a date element:
List format:%d.%m.%Y
Form format:%d.%m.%Y

On view Form data it?s O.k and right.. But in the E-mail Form i see
example:

2011-12-24 18:00:00
and i disable Time...
 
The formatting of the date works only for the display of the date in either the list or the form views. It is recorded in the database as a standard YYYY-MM-DD HH:MM:SS format and that is that data that is picked up by the email form, so you have to apply a date formatting in your email template.
 
The formatting of the date works only for the display of the date in either the list or the form views. It is recorded in the database as a standard YYYY-MM-DD HH:MM:SS format and that is that data that is picked up by the email form, so you have to apply a date formatting in your email template.

I use email as a simple html file Tempalet One.
In the previous version but it works ... I've just tested again ... How I would do best??
 
Default

With the default.php it works ... But I want to use a defined contribution ... What can I do so it works out.
return date('d.m.Y h:i:s');
Many Thanks
 
What "default.php" are you talking about?
Can you post a screenshot of your email form plugin?
What do you mean??? What file???

My Date Date element show so:
date1.jpg

And my email Templat is a Html file

date2.jpg


And the Mail show so...
 
Using the latest Git (257), I have the following results.
First, don't use the "eval" for the date. It is best to set "return current date" to on to have the current date.
Using the settings on the screenshot, I have the display dd-mm-yyyy (%d-%m-%Y) both on the list and in the email, using an html template with {date} ("date" is the name of the element) to return the date in the template.

In fact, the {date} in the email template has the same format as the list : if you change the format for the date in list view to %d-%m-%Y %H:%M, you will have dd-mm-yyyy hh:mm in the email as well.

There is a bug however inasmuch that at the moment the date is displayed between [""] both in the list and in the email template. I reported to Rob the issue.
 

Attachments

  • screenshot1.png
    screenshot1.png
    52.2 KB · Views: 197
????

I have downloaded the latest Git (257)...
I have changed my element date to...

And it?s the same .....
 

Attachments

  • date4.jpg
    date4.jpg
    58.1 KB · Views: 189
I know you have not, that is why I said you should : at this moment you don' t record anything since you don"t have a default value and the two other settings ("return curent date" and "always returns..") are both set to "nein".
 
I don?t understand...

I know you have not, that is why I said you should : at this moment you don' t record anything since you don"t have a default value and the two other settings ("return curent date" and "always returns..") are both set to "nein".

My records in list are O.K but not in the Mail
 

Attachments

  • date5.jpg
    date5.jpg
    53.8 KB · Views: 190
Yes, I reported the error to Rob and I supposed he corrected it. You should try updating to latest Git and retry.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top