Change Date Format for Email Template

Hi,

I have an email template which pulls the date of the record creation from the creaton field in goldmine. I want to make the date a little more friendly to the recipient of the email.

For example, the email currently reads like this

Hello and thank you for your application received on 02/12/2009

I would prefer the email to date to appear as follows:-

Hello and thank you for your application received on the 2nd of December

Is this possible?

Thanks
daiwhyteAsked:
Who is Participating?
 
stevengraffCommented:
Possible, yes. Pretty? Well, not really. The attached code will do the trick. You'll need to encapsulate it with angle brackets in your email template, i.e.

<<& then the code below then >>

good luck!

iif(day(createon)=1,"1st",
iif(day(createon)=2,"2nd",
iif(day(createon)=3,"3rd",
iif(day(createon)=4,"4th",
iif(day(createon)=5,"5th",
iif(day(createon)=6,"6th",
iif(day(createon)=7,"7th",
iif(day(createon)=8,"8th",
iif(day(createon)=9,"9th",
iif(day(createon)=10,"10th",
iif(day(createon)=11,"11th",
iif(day(createon)=12,"12th",
iif(day(createon)=13,"13th",
iif(day(createon)=14,"14th",
iif(day(createon)=15,"15th",
iif(day(createon)=16,"16th",
iif(day(createon)=17,"17th",
iif(day(createon)=18,"18th",
iif(day(createon)=19,"19th",
iif(day(createon)=20,"20th",
iif(day(createon)=21,"21st",
iif(day(createon)=22,"22nd",
iif(day(createon)=23,"23rd",
iif(day(createon)=24,"24th",
iif(day(createon)=25,"25th",
iif(day(createon)=26,"26th",
iif(day(createon)=27,"27th",
iif(day(createon)=28,"28th",
iif(day(createon)=29,"29th",
iif(day(createon)=30,"30th",
iif(day(createon)=31,"31st",

"")))))))))))))))))))))))))))))))

+ " of " +

iif(month(createon)=1,"January",
iif(month(createon)=2,"February",
iif(month(createon)=3,"March",
iif(month(createon)=4,"April",
iif(month(createon)=5,"May",
iif(month(createon)=6,"June",
iif(month(createon)=7,"July",
iif(month(createon)=8,"August",
iif(month(createon)=9,"September",
iif(month(createon)=10,"October",
iif(month(createon)=11,"November",
iif(month(createon)=12,"December",

""))))))))))))

Open in new window

0
 
GMGeniusCommented:
Hi daiwhyte,

Probably the closest you can get is to add this to your template

<<WDATE(contact1->createon,3)>>

where the fortmat is as follows

WDATE(<date>, <format>) ,Returns the <date> formatted in variety of ways, based on the optional parameter <format>.

0             mmm dd, yy                     Jan 22, 97
1ddd, mmm dd, yy
Thu, Jan 22, 97
2
mmm dd
Jan 22
3
Long date style
Thursday, Jan 22, 1997
The Long date style format 3 is taken from the Windows Regional Settings.
Return type: String
Example
WDATE(Contact2->UDATE, 1)
returns Thu, Jan 22, 97.
0
 
GMGeniusCommented:
Sorry browser problem and I cant edit my posting

0       mmm dd, yy              Jan 22, 97
1      ddd, mmm dd, yy       Thu, Jan 22, 97
2      mmm dd                     Jan 22
3      Long date style         Thursday, Jan 22, 1997

The Long date style format 3 is taken from the Windows Regional Settings.

Return type: String
Example
WDATE(Contact2->UDATE, 1)
0
 
automationstationCommented:
Very nice posts stevengraff and GMGenius!
0
 
daiwhyteAuthor Commented:
Thank you Stevengraff
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.