Notifications
Announcements
No record found.
Hi,
I am writing code unit for some business process.
I need to get time from datetime variable.
E.g. i have datetime "1/22/2020 5:00 AM", i need to get 5:00 AM and save it in a variable.
Thanks
Date := DT2DATE(Datetime)
DatetimeType: DateTime
The DateTime of which to return the date part.
Type: Date
The date part of the DateTime object.
try to use DT2Time Method
+ useful link: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-data-type
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.
OussamaSabbouh 3,377
Jainam M. Kothari 2,696 Super User 2025 Season 2
YUN ZHU 1,512 Super User 2025 Season 2