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)
Display and Format Two dates in one column
koallen
I have a requirement to display two dates in one column as:
Certification Period:
April 15,2010 - June 15,2010.
Both dates are retrieved from the database as separate columns, I would appreciate any help on how to proceed.
My challenge is that when I attempt to place both columns in a computed column, I lose the formatting of the date, so the data is presented as "4-15-2010 -6-15-2010"
Find more posts tagged with
Comments
mwilliams
Hi koallen,<br />
<br />
You should be able to do something like the following in a type string, computed column.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
df = new Packages.java.text.SimpleDateFormat("MMMM dd, yyyy");
df.format(row["startDATE"]) + " - " + df.format(row["endDATE"]);
</pre>
<br />
Let me know if you have any questions or issues with this.
koallen
That resolved my issue.Much appreciated.
mwilliams
No problem. Glad to help! Let us know whenever you have questions!