Announcements
No record found.
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
Do you mean the short date format set up in Windows on user's client machine?
Yes.
Try this:
System.Globalization.DateTimeFormatInfo formatInfo = System.Globalization.DateTimeFormatInfo::get_CurrentInfo(); str shortDatePatten = formatInfo.get_ShortDatePattern();
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) ;
}
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.