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
03-13-2017 08:37 AM
Thanks guys -- not sure what is going wrong here, but no data is populating in my u_monthyear field. I've tried both codes you've sent. I feel like I'm overlooking something obvious.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 08:40 AM
The code I gave you should go in a business rule. Can you post the screenshot of the business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 08:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 08:47 AM
A minor correction. Use this code
var gdt= new GlideDateTime(current.u_datetimeoccurance.getDisplayValue());
current.u_monthyear=gdt.getMonthLocalTime()+' '+gdt.getYearLocalTime();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2017 09:27 AM
Thanks Skip -- that worked for me!