How can I get the current day format of the current user (whether is dd/mm/yy or yy/mm/dd etc.)?
Thanks :)
*This post is locked for comments
you can use this method
display str FinalTXT()
{
return 'From: ' + dayname(dayofwk(fromdate)) + ' ' + date2str(fromdate,123,DateDay::Digits2,DateSeparator::slash,DateMonth::Digits2,
DateSeparator::slash, DateYear::Digits4) + ' To: ' + dayname(dayofwk(todate)) + ' '
+ date2Str(todate,123,DateDay::Digits2,DateSeparator::slash,DateMonth::Digits2,
DateSeparator::slash, DateYear::Digits4) + ' Time: ' + time2Str(timenow(), TimeSeparator::Colon, TimeFormat::AMPM) ;
}
Try this:
System.Globalization.DateTimeFormatInfo formatInfo = System.Globalization.DateTimeFormatInfo::get_CurrentInfo(); str shortDatePatten = formatInfo.get_ShortDatePattern();
Yes.
Do you mean the short date format set up in Windows on user's client machine?
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156