web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to default time field to be blank instead of 12:00 am?

(0) ShareShare
ReportReport
Posted on by 135

I have a time field on a form that needs to be blank instead of defaulting to 12:00 am. How can I get the field to be blank?

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Re: How to default time field to be blank instead of 12:00 am?

    But what is "blank time"? Time in AX is (by design) a number of seconds since midnight, i.e. empty time = number 0 = zero seconds since midnight = 12:00 am. And AX doesn't support null values in database.

  • Dean Profile Picture
    135 on at
    Re: How to default time field to be blank instead of 12:00 am?

    Martin, that is what  I suspected. However, the user of the form would like it to be blank so that the people in her department do not accidentally leave it at the default time of 12:00 AM. This time will appear on some shipping documents.

  • Suggested answer
    David Kidder Profile Picture
    on at
    Re: How to default time field to be blank instead of 12:00 am?

    There isn't a way to set a time control's value to blank. However, if the control had it's Mandatory property set to "Yes", the user wouldn't be able to save a record without first changing the time.

  • Dean Profile Picture
    135 on at
    Re: How to default time field to be blank instead of 12:00 am?

    Unfortunately it is not needed in every situation.

  • Martin Dráb Profile Picture
    236,320 Most Valuable Professional on at
    Re: How to default time field to be blank instead of 12:00 am?

    You can write your own validation logic, of course.

    Another (not very nice) workaround is to use an invalid value, e.g. -1. In that case, date control shows "??????".

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

#2
NNaumenko Profile Picture

NNaumenko 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans