what data type can be used for date, time and years when creating a table in servicenow?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2024 08:27 AM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2024 12:08 PM
Hi,
Below are the date fields which supported by ServiceNow:
Date and time field typesField type Dictionary XML type MySQL DB type
Date glide_date DATE
Date/Time glide_date_time DATETIME
Time glide_time DATETIME
Duration glide_duration DATETIME
Due date due_date DATETIME
To populate only year use below client script below:
var reg = /(19[6789]\d|20[01]\d)/ ;
var ans = g_form.getValue('fieldname');//replace with your field name
if(!reg.test(ans))
{
alert('Please enter valid year');
}
**Please Hit Correct, Helpful or like,if you are satisfied with this response.
Thanks & Regards,
Sumanth Meda