How to get use date in function field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:09 AM
I am using function field and want to get just the date difference. I used the following and it returns the hours/minutes etc.
glidefunction:datediff(now(), start_date)
what can I use to replace now () to just get the date?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:32 AM
Can you tell me what are you trying to achieve so that I can help you more
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:34 AM
Hello,
you can take a look here
https://www.servicenow.com/community/developer-forum/how-to-get-the-time-difference-between-two-date...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:38 AM - edited ‎11-30-2022 10:52 AM
Please share your requirement then only I will be able to help you
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:41 AM - edited ‎11-30-2022 10:42 AM
My requirement is to find the difference between today's date and start date. I have a function field that I am trying to use glidefunction. To get current date I tried to use now() but difference is returning in hours/seconds etc. Start date is just date. not datetime. I want the date difference in days/years no time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 10:42 AM
Hi Samadam,
If your requirement is to set today's date in a custom field, you can do it like this:
JP