Reputation: 261
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?
Upvotes: 1
Views: 1863
Reputation: 261
I fixed this issue. I changed the Property of "TimeZoneIndicator " property to "Never" on form field level. That fixed the issue.
Upvotes: 1
Reputation: 18051
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.
Upvotes: 0