How to set a timestamp variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 07:06 AM
Hi all,
How do you set a timestamp variable? I looked to see if there was a built in function for that but didn't see anything. Ultimately I'm doing a custom business rule that I need to add the same time stamp to a new table field as what's in the "last update" column. Is there a variable already set with this last update time?
(For clarification I can't have the last update column be copied to the new column, I need the same date and time data as it uses so I can perform a workflow based on times.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 09:52 AM
If possible, when you create your new table, extend your table off the "task" table. It already has those types of fields available.
http://wiki.servicenow.com/index.php?title=Task_Table
However your new table may not fit with the task table, and you don't want to extend off the task table. In that case, open the dictionary entry for your "last update" column, and set some fields:
Type: glide_date_time
Default value:javascript:gs.nowDateTime()
Mike