cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

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

LLawton
16-Pearl

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

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?

ACCEPTED SOLUTION

Accepted Solutions

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)


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

View solution in original post

4 REPLIES 4

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)


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
khoppe
15-Moonstone
(To:KaelLizak)

Hello Kael,

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

Regards,

Klaus

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


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

I don't understand why this question is marked as solved; I'm the author and I didn't do that.

Especially since the solution is that there is no solution, just an idea that is marked as "might be considered in the future".

Announcements


Top Tags