1

I have a UTC date time field on form.

But i need only date to be displayed so i kept display as date.

But i am getting a clock symbol in the field.

Is there any way i can remove that symbol?

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Raas
  • 261
  • 8
  • 25

2 Answers2

1

I fixed this issue. I changed the Property of "TimeZoneIndicator " property to "Never" on form field level. That fixed the issue.

Raas
  • 261
  • 8
  • 25
0

I assume you mean the calender symbol in the DateTime edit control.

You can disable the hour, minutes and seconds display on the extended data type (TimeHours attribute etc.) or on the DateTime form control, and AX removes the space for the time. However AX still shows the calendar icon, even if you set the LookupButton attribute to Never, unless you also set AllowEdit to No.

What you can do is replace the DateTime control with an edit or display method control, and do the required conversions yourself.

edit date transDate(boolean _set, date _date)
{
    TimeOfDay time;
    if (_set)
    {
        time = DateTimeUtil::time(DateTimeUtil::applyTimeZoneOffset(utc, DateTimeUtil::getUserPreferredTimeZone()));
        utc  = DateTimeUtil::removeTimeZoneOffset(DateTimeUtil::newDateTime(_date, time), DateTimeUtil::getUserPreferredTimeZone());
    }
    return DateTimeUtil::date(DateTimeUtil::applyTimeZoneOffset(utc, DateTimeUtil::getUserPreferredTimeZone()));
}

The utc variable holds the saved date/time value.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • Hi Thanks for the reply. The clock symbol i am saying is not calendar icon. I am getting Circular clock symbol. I observed that when i kept "TimeZonePreference Property of EDT to NoConversion" then i am getting clock symbol. If i kept it as User/Auto then my functionality is breaking. But i have to get rid of that clock. Thats what i am worried. Any idea of getting rid of clock symbol without changing TimeZonePreference property from NoConversion to Other values.? – Raas Jan 19 '15 at 05:22
  • Its AX2012 R3 version. – Raas Jan 19 '15 at 09:08
  • There is no clock symbol in prior versions, I have not tried the R3 version yet. You could try to apply the work-around in the answer. – Jan B. Kjeldsen Jan 19 '15 at 09:10
  • Oh ok. Sure i will try to do some workaround and will update you. Thanks. – Raas Jan 19 '15 at 09:54
  • Hi, Not yet. I didnt get time to check that. Will update once i go through that. – Raas Feb 03 '15 at 09:03