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)
Formatting date time
Megha Nidhi Dahal
Hi There,
I've got two date time columns, from date and to date.
Is it possible to display these dates as "[from date] to [to date]", in a single column? If I do so, the column type has to be string and the formatting would not hold.
I want it to be formatted as well displayed as said earlier.
Any links or examples?
regards
Arpan
Find more posts tagged with
Comments
kallem
You can do it with scripting e.g.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
importClass(java.text.SimpleDateFormat);
var dateFormat = SimpleDateFormat.getDateInstance();
dateFormat.format(row["From"]) + " - " + dateFormat.format(row["To"]);
</pre>
And you can adjust formatting by creating custom SimpleDateFormat.<br />
<br />
Works either as Data or Dynamic Text item.<br />
<br />
- Kalle