Skip to main content
16-Pearl
February 17, 2015
Solved

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

  • February 17, 2015
  • 1 reply
  • 2960 views

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?

    Best answer by KaelLizak

    Hello Laurent,

    This issue is covered by RFC 107695. Please open a case with PTC Integrity Support to add your organization to it.

    Warm Regards,

    Kael

    (Edited 2015-02-18EST10:48 by Kael: Mis-typed RFC number as 107696 instead of 107695)

    1 reply

    KaelLizak16-PearlAnswer
    16-Pearl
    February 17, 2015

    Hello Laurent,

    This issue is covered by RFC 107695. Please open a case with PTC Integrity Support to add your organization to it.

    Warm Regards,

    Kael

    (Edited 2015-02-18EST10:48 by Kael: Mis-typed RFC number as 107696 instead of 107695)

    15-Moonstone
    February 3, 2017

    Hello Kael,

    I like to have a look into the SPR.  Does also exist an SPR no. for it?

    Regards,

    Klaus

    16-Pearl
    February 3, 2017

    Hello Klaus Hoppe‌,

    Because that RFC was a feature request rather than a defect report, it does not exist as an SPR.  I searched the existing Ideas, and found there is an Idea which might be interpreted as being close:  Override locale information on date fieldsYou probably want to create your own Idea to reflect RFC 107695/CS85012.

    Kind Regards,

    Kael