- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 08:46 PM
Hi,
I need to get the date and time one hour before the time of "sys_created_on" that exists in every table.
now
2020-06-01 08:00:00
↓
display
2020-06-01 07:00:00
Is it feasible?
Regards,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 10:03 PM
Hey,
Absolutely yes.
You can use this script as a basis and you can test using bg script:
var date = new GlideDateTime("2020-06-01 08:00:00");
gs.info(date.getValue());
date.addSeconds(-3600);
gs.info(date.getValue());
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 10:03 PM
Hey,
Absolutely yes.
You can use this script as a basis and you can test using bg script:
var date = new GlideDateTime("2020-06-01 08:00:00");
gs.info(date.getValue());
date.addSeconds(-3600);
gs.info(date.getValue());
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 12:00 AM
Hi,
Thank you.
I worked it!
Regards,