Custom date formats

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

ericchaves
Posts: 19
Joined: Thu Dec 31, 2009 7:44 pm

Custom date formats

Post 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
pheelix
Posts: 101
Joined: Thu Nov 20, 2008 4:34 pm
Location: Dresden, Germany
Contact:

Post 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.
ericchaves
Posts: 19
Joined: Thu Dec 31, 2009 7:44 pm

Post 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.
pheelix
Posts: 101
Joined: Thu Nov 20, 2008 4:34 pm
Location: Dresden, Germany
Contact:

Post 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?
ericchaves
Posts: 19
Joined: Thu Dec 31, 2009 7:44 pm

Post 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. :lol:
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Custom date formats

Post 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/
OpenEMM Maintainer
Post Reply