Hi Everyone,
A small request. How can I get server date using x++ code.
Thanks.
Hi Everyone,
A small request. How can I get server date using x++ code.
Thanks.
currentDate.dateValue(DateTimeUtil::getToday(preferredTz));
currentTime.value(DateTimeUtil::getTimeNow(preferredTz));
currentTimeZone.selection(preferredTz);
sessionDate.dateValue(DateTimeUtil::date(sessiondatetime));
sessionDate.value(DateTimeUtil::time(sessiondatetime));
sessionTimeZone.selection(preferredTz);
Hi Apratim,
You can make use of DateTimeUtil class.
DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone());
Thanks,
Girish S.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156