Business rule to set field with Month/Year from date field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 09:07 AM
I want to use a business rule to get the Month and Date from a Date field, and then populate a string field with those values. Both fields are on the same table (time_card).
Thanks for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 01:20 PM
Hi Van,
I don't see the option on this thread, but I do see it on the "Resource Plan to include skills" thread.
I think I had the option before, but I don't remember for sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 07:58 AM
Skip -- would you mind pasting the code you used to get this working? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 09:15 AM
You can use this
var gDate = new GlideDate();
gDate.setValue(current.<date field name>);
var gDT = new GlideDateTime(gDate);
var year=gDT.getYear();
var day=gDT.getDayOfMonth();
var month=gDT.getMonth();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2017 02:33 PM
Not able to get this to work - can someone post the full script please?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 08:01 AM
kim.sullivan@postproperties.com
I need more details. What is your use case? Are you doing this from a business rule? If you have code, please post here I can look in to it.