This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Date format changes in email notification
Started 11 years ago by supportbillglassorg | 9 posts |
-
I setup a form that uses the Date format as mm/dd/yyyy but when I receive the notification email it changes it to Month Day, Year. For example, if I select 05/13/2013, the email shows it as May 13, 2013. How do I get the email to show it as 05/13/2013 (mm/dd/yyyy)?
Posted 11 years ago # -
You can edit the "includes/entry-functions.php" file. Search around line 508 for this code:
$date_value = date("M d, Y",strtotime($date_value));
change it to become:
$date_value = date("m/d/Y",strtotime($date_value));
MachForm Founder
Posted 11 years ago # -
I had this working in v4.0, then lost it when I upgraded to v4.1. The date format on the form is mm/dd/yyyy. But when I export to excel, it comes out M d, Y. Should this edit still work for v4.1?
Posted 10 years ago # -
You'll need to edit the "export_entries.php" file as well, search around line 805 and 814. You'll find similar codes there.
MachForm Founder
Posted 10 years ago # -
Worked perfectly. Thank you.
Posted 10 years ago # -
Same with 4.3? I just edited both of those files and doesn't seem to make a difference.
Posted 10 years ago # -
Looks like I found it, but its doing something odd.
For March 27, 2015 I'm now getting 03/Fri/2015
I need Friday to show as 27, not Fri.
Posted 10 years ago # -
I think the PHP would be like
date("l, M d , Y",strtotime($date_value));
Which should give you Sunday, March 27, 2015
M = Month
d = Date (of the month)
Y = Year
l = day (of the week - note that's a lower case "L").The lower case or uppercase make a difference in the formatting, so you need to choose the right one.
You could have a look at the site below, which details some of the PHP date functions with examples.
Posted 10 years ago # -
It would be great if this could be added as a preference in "Settings", or maybe per form. I need to fix this every time I upgrade to a new version.
Feature request: Allow people to pick a default date format for all email notifications.
Thanks! :)
Posted 9 years ago #
Reply
You must log in to post.