Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Changing the jobcompletion date format in subject line
actuser9
<p>Hi Gurus,</p>
<p> </p>
<p>Good Morning!</p>
<p> </p>
<p>We have been using the default email notification format upon successful schedule job completion. We would like to include the jobCompletion variable in the subject line with the date formatted to "yyyy-mm-dd" as below. How can the default date format of jobCompletion variable showing as "Thursday, September 25, 2015 5:22:37 AM CST" be changed to "2015-09-25"?</p>
<p> </p>
<p> </p>
<div><subject></div>
<div><insert variable="jobName"/>,</div>
<div><insert variable="jobSubmitter"/>, </div>
<div><insert variable="jobCompletion"/></div>
<div></subject></div>
<div> </div>
<div>
<div>I am using iHub2.</div>
<div> </div>
<div>Appreciate any help on this.</div>
</div>
Find more posts tagged with
Comments
JFreeman
<p>This may be a bit tricky as the date will always come in in that format from the server and I do not believe there is a way to request a different format for the value.</p>
<p> </p>
<p>It is possible to configure the email notification with an HTML content body. Doing this, you may also be able to use some javascript to read that date value and modify it's format.</p>
<p> </p>
<p>Here is an example of an acnotification.xml configuration that has an HTML body that should serve as a base for getting started:</p>
<pre class="_prettyXprint _lang-xml">
<successMessage>
<subject>Report Delivery Notification: <insert variable="jobHeadline"/> </subject>
<body email-content-type="text/html">
<![CDATA[<html><body><h2>]]><insert variable="jobHeadline"/>
<![CDATA[</h2>]]>Version <insert variable="reportDocumentVersionNumber"/> of report <insert variable="reportDocumentName"/> is now available online.
<![CDATA[<a href="]]><insert variable="reportLink"/>
<![CDATA[">Go to Report</a><p><table border="2pt;"><tr><td>Report Submitter: </td><td>]]><insert variable="jobSubmitter"/>
<![CDATA[</td></tr><tr><td>Report Generation Date: </td><td>]]><insert variable="jobCompletion"/>
<![CDATA[</td></tr></table><br><br></body></html>]]>
</body>
</successMessage> </pre>
actuser9
<p>Hi Jesse,</p>
<p> </p>
<p>Our UAT environment is currently down but I would like to test it out and get back to you.</p>
JFreeman
<p>Sure thing.</p>
<p>Let me know the results.</p>