Page 1 of 1
Custom date formats
Posted: Fri Jan 01, 2010 4:46 pm
by ericchaves
Hi Folks,
Can I add a custom date format or am I restricted to those listed today? I'd like to add dates using slahs as separators like dd/MM/yyyy.
Best regards,
Eric
Posted: Fri Jan 01, 2010 6:00 pm
by pheelix
i think openemm receives the format from the db and then uses java SimpleDateFormat to implement it.
so, i expect you to have 4 datetypes in your date_tbl in your openemm-db.
so connect to your mysql-server and run:
Code: Select all
INSERT INTO date_tbl (type, format) VALUES (4, 'dd/MM/yyyy');
and use the [agnDATE type=4] - tag in your mailing.
hope this helps.
Posted: Fri Jan 01, 2010 8:46 pm
by ericchaves
Hi Pheelix,
Thanks for the help. I inserted the new format, but it did not worked as expected. What I like to do is to import files with date in that format. After inserting went to the profile manager and it still not accepting the new format.
I Also noted that the import profile uses some formats that are not set in the date_tbl table.
But thanks anyway.
Posted: Fri Jan 01, 2010 10:28 pm
by pheelix
ok, i thought you want to display the dates in the mailing.
you should convert the dates in the import-file to the database's style, otherwise you have to change the date-handling within the source-code or you will experience much more errors.
do you want to import from a csv-file?
Posted: Fri Jan 01, 2010 10:31 pm
by ericchaves
No worries. I convert the date to ISO format and now its ok. By the way, yes I'm importing from a CSV file.
Thanks again for the help.

Re: Custom date formats
Posted: Thu Mar 08, 2012 10:22 am
by maschoff
Install Guide for OpenEMM 2011 was updated with new section 6.6 explaining the creation of customized date formats:
https://sourceforge.net/projects/openem ... rsions%29/