Yokohama version displays date field in Portal in strange format

YamaT
Tera Contributor

Please excuse the automatic translation.

 

Today, we upgraded from Washington to Yokohama.
As a result, the behavior of the Date-type field in the Catalog Item became abnormal.

 

Assumption: The “glide.sys.date_format” property is set to “yyyy/M/d”.

YamaT_0-1744178455063.png

 

Problem behavior:

 When entering “2024/12/31” in the Date-type field "Birthdate", it automatically changes to “2024/12/366”.

YamaT_1-1744178473317.png

If I enter 2024/12/31, I want 2024/12/31 to be displayed.

 

Please lend us your wisdom on this issue.

 

ーーー以下、原文ーーー

本日、WashingtonからYokohamaにバージョンアップしました。
すると、Catalog Itemで作った「Date」型の項目の挙動がおかしくなりました。

 

【前提】

Propertiesの「glide.sys.date_format」は「yyyy/M/d」です。

 

【問題の挙動】

Date型の項目「生年月日」に「2024/12/31」を入力すると、自動で「2024/12/366」に置き換わります。

 

2024/12/31を入力したら、そのまま2024/12/31が表示されるようにしたいです。

どうかみなさまのお知恵をお貸しください。

1 件の受理された解決策

@YamaT 

then it's not working as expected and seems to be a platform bug.

If you are sure no script etc is running on that date field which is changing it, then raise a Case with ServiceNow.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

元の投稿で解決策を見る

7件の返信7

Ankur Bawiskar
Tera Patron
Tera Patron

@YamaT 

was this working fine till Washington?

what's your date/format in Preferences?

If system date format is "MM-dd-yyyy" but user has date format as "dd/MM/yyyy" in sys_user or in preferences then it will display the selected value as per logged in user's format

That's the platform behavior OOTB behavior and nothing to do with upgrade

check the output here

date format for user.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Robert H
Mega Sage

Hello @YamaT ,

 

Please note that “glide.sys.date_format” specifies the default date format, but each user can select their own personal date format in their profile or session preferences. This seems to be the case here.

 

RobertH_0-1744181120474.png

 

Regards,

Robert

YamaT
Tera Contributor

@Ankur Bawiskar @Robert H 

Thank you for your response.

 

> was this working fine till Washington?
Yes, it was working fine.
When entering 2024/12/01, it displays as 2024/12/1.
When entering 2024/12/31, it displays as 2024/12/31.

 

> what's your date/format in Preferences?
For all sys_user records, "Data format" is blank.
When you open the form screen, it appears that "System (yyyy/M/d)" is set.

YamaT_0-1744181438186.png

 

 

 

YamaT_5-1744181631022.png

 

 

Additionally, when I changed my user’s Data format in sys_user to “yyyy-MM-dd”, entering 2024-12-31 displayed as 2024-12-31.
However, since our scripts have been built on the assumption that the format is “yyyy/M/d”, we cannot simply change it to “yyyy-MM-dd”.

 

I appreciate your continued support.

 

ーーー以下、原文ーーー

ご回答ありがとうございます。


> was this working fine till Washington?
はい、問題なく動いていました。
2024/12/01入力時は、2024/12/1と表示されます。
2024/12/31入力時は、2024/12/31と表示されます。

 

> what's your date/format in Preferences?
sys_userの「Data format」は全員、空状態です。
form画面を開くと、「System (yyyy/M/d)」がセットされているように見えます。

 

また、sys_userにて、私のユーザのData formatを「yyyy-MM-dd」に変更したところ、2024-12-31入力時に、2024-12-31と表示されました。
ただ、これまで「yyyy/M/d」であることを前提にスクリプトを作ってきましたので、安易に「yyyy-MM-dd」に変更できません。

 

恐れ入りますが、引き続きよろしくお願いいたします。

YamaT
Tera Contributor

Additional Information:
The display works fine on the standard UI.

YamaT_6-1744182397858.png


This strange phenomenon only occurs on the Service Portal screen.

YamaT_7-1744182414636.png