- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 08:11 AM
Hi,
I have written some Validation to the Date Field , i.e, The Date field should be filled by default on "Onload" with some specific Date.
Everything is working fine except the Date Format. OnLoad the Date format is "YYYY_MM_DD" but on selection of any date, the format is different "DD_MM_YYYY".
I want the default Date format in "DD_MM_YYYY", how to set that , Can anyone please help me out.
Thanks in Advance.
BR.
Smitha
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 08:59 AM
Since GlideDate() as well as GlideDateTime() always use yyyy-mm-dd, you can change the format of your return value of dat by just adding .getDisplayValue():
return dat.getDisplayValue();
That will give you the format of whatever the user has even if they are using something else such as mm-dd-yyyy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 09:41 AM
Yes it does. If you want, just impersonate a different user, change their date format, then test your functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2017 12:09 AM
Thank you Christopher. It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 08:19 AM
it comes from system property 'glide.sys.date_format'. you can change as per your requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 08:22 AM
Hi Smitha,
Please set date format according to your requirement from system properties
System Properties- Basic Configuring- Date Format
Thanks
Ziaur Rahman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2017 08:31 AM