Quantcast
Channel: PTC Community : Popular Discussions - Integrity
Viewing all articles
Browse latest Browse all 3432

How can I remove the "GMT" information from a date field?

$
0
0

I have a computed date field (date only, not timestamp) that uses the function firstTimeEntryDate() to find the earliest time entry on an item.

The output looks like this: Jan 13, 2014 GMT+00:00

I want to get rid of the useless "GMT" information.

My first instinct is to try to parse the date and reformat it, so I end up with something that looks like this:

timestamp(

concat(

Substring( MonthOfYearName( firstTimeEntryDate() ) , 1 , 3 ) ,

Text( " " ) , ToText( getDay( firstTimeEntryDate() ) ) ,

Text( ", " ) , ToText( getYear( firstTimeEntryDate() ) )

)

)

This doesn't work because "The Timestamp() function takes a single argument which must be a string in the format java.text.SimpleDateFormat".

I know I can do the parsing into a text field, but I want a date.

Does anybody have a solution to format a computed date field, or more specifically remove the GMT information?


Viewing all articles
Browse latest Browse all 3432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>