Notifications
Announcements
No record found.
Hi everyone,
Can you help me how can I get the value of a dateTime field value with JS.
Can I also get this field with the dd/MM/YYYY with Power automate ?
Thank you for your help
Best regards,
Julien,
Hi Julien_Admin,
To get the value using JS. Use: formContext.getAttribute(arg).getValue(). For more details: https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/attributes/getvalue.
Yes, you can get the field with the dd/MM/YYYY with Power automate.
Hi Julien,
Please follow this link,
community.dynamics.com/.../getting-only-date-from-date-time-field-using-javascript
Please mark the answer as verified if that's resolve your problem.
Hello Julien_Admin
if you want take datetime field from page then you can use below method:
//get valuevar startDate = Xrm.Page.getAttribute("new_dateauthorized").getValue();var year = startDate.getFullYear() + "";var month = (startDate.getMonth() + 1) + "";var day = startDate.getDate() + "";var dateFormat = year + "-" + month + "-" + day;
//set value according to format
Xrm.Page.getAttribute("new_dateauthorized").setValue(dateFormat);
Using POWER AUTOMATED you can follow this link : https://d365demystified.com/tag/datetime-in-power-automate/
I hope it helps,Thanks.Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Portal.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 170 Super User 2025 Season 2
#ManoVerse 70
Jimmy Passeti 50 Most Valuable Professional