In this blog lets see how we can split or get the Month | Day | Year from a selected date in the CRM Date and time type field.
I have created a field in CRM with field type Date and time. Here is how it looks
This code gets the date selected in the date field and splits the date into
Month – (getMonth()) Note : January – December is (0-11) hence add 1 so make it (1-12).
Day – (getDate())
Year – (getFullYear())
This code gives the month date and date in 2 digit format i.e. if the date is a single digit say 9 it will give it as 09.
You can further use this according to your requirement either to change the date format or for many other date related customizations.
Hope this helps !