?
Solved

Change Date Format for Email Template

Posted on 2010-01-05
5
Medium Priority
?
433 Views
Last Modified: 2013-11-15
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
0
Comment
Question by:daiwhyte
5 Comments
 
LVL 11

Accepted Solution

by:
stevengraff earned 2000 total points
ID: 26180933
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
 
LVL 12

Expert Comment

by:GMGenius
ID: 26181007
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
 
LVL 12

Expert Comment

by:GMGenius
ID: 26181031
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
 
LVL 6

Expert Comment

by:automationstation
ID: 26181522
Very nice posts stevengraff and GMGenius!
0
 

Author Closing Comment

by:daiwhyte
ID: 31672938
Thank you Stevengraff
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The need for Texting We all wear many hats. Part of this article's focus is the marketing hat... and another part is the consumer hat. Those of us who are consumers frequently are either ambivalent toward, or hiding from... those of us who are mark…
Decide what contact details to include in email signatures with these top 10 email signature contact details DOs & DON'Ts.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question