How I will get todays system date in d365 F&O - X++ Code

X++ Programming Language >   Data Types in X++ Language >   Primitive Data Types  

Long Question

2842


Answer:

In this answer we will show you how to get todays date in current time zone. You can use the below code to get the todays date.



info("System Date = %1", DateTimeUtil::getToday(DateTimeUtil::getUserPreferredTimeZone()));




strFmt("MyFileName -  %1.xlsx", DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::utcNow(), DateTimeUtil::getUserPreferredTimeZone()));



This Particular section is dedicated to Question & Answer only. If you want learn more about X++ Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.