Blog

Name is Anant Dubey and the intent to create this blog is to discuss the problems and issues that developer face in the dynamics AX development and to share the new things that come up with the new version of AX.

Monday, November 14, 2016

change date time format in SSRS report in AX 2012

Today is another small tip,
I was developing a custom report. Queried table stored the date and time in separate fields ie. Transdate and transtime. On  mapping the transtime to report, its showed time format. Instead of time value.
2016-10-28_19-18-27
For it solution, I added the string field on report temp table and then convert the time with time2str function and map to the field.
Complete statement is below.
TableTmp.StransTime  = time2Str(_Trans.transTime, TimeSeparator::Colon, TimeFormat::AMPM);

As result, report will display the trans time instead of its format.
2016-10-29_1-56-07

Reference taken by:- https://community.dynamics.com/ax/b/alirazatechblog/archive/2016/10/28/time-field-on-ssrs-shows-time-format-report-dynamics-ax-2012

No comments:

Post a Comment