Day of Week

Hi,

I’ve done a lot of research (but clearly not enough) and a lot of formatting attempts to get a Day of Week, or Week Day format for a DateTime field. After an insert from a form, I have the event “OnAfterInsert” fire out an email with several bits of data. It’s all working, and I have the date formatted like I want, but I also want to include the Week Day - Like “Monday”.

Here’s the line snippet that formats the date currently:

$mail_message = $mail_message.'Incident Date: ’ . sc_date_conv({IncidentDate},“db_format”,“mm/dd/yyyy”) . ‘<br><br>’;

For today, it would show Incident Date: 12/16/2013
How do I have it show: Monday, 12/16/2013

I’ve tried SO many different things and I either get an error, or the field comes across blank in the email.

Thanks in advance!

Mark.

Use the Date functions from PHP: Click! For example GetDate().

Thank you sir - certainly gave me more to work with, but I can only guess my DateTime field is not formatted correctly because I couldn’t get GetDate() to work - kept saying it needed a longer string or something like that. I did end up getting it working though, thanks to your lead, with:

$mail_message = $mail_message.'Incident Date: ’ . date(‘l jS \of F Y’, time(‘IncidentDate’)) . ‘<br><br>’;

I took out the other formatting since it wasn’t necessary, and this works perfectly now. Thanks very much!

Mark.

Edit: This didn’t actually work perfectly as it always seemed to pull in the current date. I edited the formula to this, and now works fine:

date(“l, jS \of F Y”,strtotime({strIncidentDate}))