Placeholder - format date to dd/mm/yyyy

oasis58

New Member
Hello,
I have a form that contains the data to set up an email template.
The form consists of a text element that contains a date.
The date is expressed through a placeholder
The placeholder displays the date in MySQL format yyyy-mm-dd
I would like to change the format to dd/mm/yyyy
How can placeholders be used with different date formats?
Thank you all
 
Again, it depends on where you need it.
In date and jdate elements you have the "List format" and "Form format" fields under the "Date Formats" tab where you can set it.
The code example posted can be used e.g. in calc elements where date/time is to be returned in a specific format.
 
i'm using this formula .this one get diff in day. but at the same time i want to get diff in month in other field.
$nowdate = strtotime("{modul_maklumat_kemasukan_projek_baru___tarikh_mula_projek}");
$thendate = strtotime("{modul_maklumat_kemasukan_projek_baru___tarikh_tamat_projek}");
$datediff = ($thendate - $nowdate);
$diff = round($datediff / 86400);
return $diff;
 
i'm using this formula .this one get diff in day. but at the same time i want to get diff in month in other field.
(...)
$diff = round($datediff / 86400);

While a day has 86400 seconds, a month with 30 days has 2592000 seconds...
 
I have recently moved away from using php date & time functions to using the Chronos library. It is much easier to do comparisons, finding the differences, managing timezones, etc. You may wish to have a look at it. You will need to get a copy and place it in your website somewhere so you can call the autoloader. Fixed a bunch of problems I have been plagued with re dates and times. My hosting site is on Central time whereas we are on Eastern so it was a constant battle managing UTC, CST and EST in my code.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top