function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MPetersenMPetersen 

Setting up date time stamp in Email Template

Hello,

 

I am trying to setup a date time stamp at the top of an email template so it would look something like this:

 

Jul 15 2009 10:01AM

 

I have tried using the {!Now()} function in my email template but it comes out as GMT which is a few hours ahead of us here in CST.  

 

Could anyone tell me a better way to add today's date to the top of an email?  I've been all through the discussion boards and Technical Library and can't seem to find it.  If I missed an example or discription a link to that would be great too.

 

Thanks in advance,

Marc Petersen

Best Answer chosen by Admin (Salesforce Developers) 

All Answers

JamesZJamesZ

If I understand your question correctly you should be able to use

{!Today}

to render the current date, you would then possibly need to adjust the formatting to add the time stamp.

 

I do not know if this will work with a Visualforce page.

 

james

MPetersenMPetersen

Sorry. What I was asking was how to change the formating of the time to CST. {!Now()} gives the time in GMT I just need to know how to add 6 hours to that.

 

Or, if I used {!Today()} how could I get rid of the 00:00:00 GMT?

 

Thank you.

Message Edited by MPetersen on 07-20-2009 12:21 PM
FipzFipz

Hello,

 

i know its an old thread, but what about this solution:

 

 

Now +0.25: {!Now()+0.25}

 

Now -0.25: {!Now()-0.25}

 

1 = 1 day

0.5 = 1/2 day = 12 hours

0.25 = 1/4 day = 6 hours

 

 

Regards,

 

Fipz

Elaina MyersElaina Myers
The above link did not work for me. It looks like this is the updated URL: https://developer.salesforce.com/forums/?id=906F000000098DmIAI

Regards,
Elaina