Date Time Field

We have a testing environment in which I have a customization on the UD40 Table. Several fields are displayed and two fields are bound to Date Fields that were created on the OrderHed Table. Everything works great and displays without errors. I moved this entire UD40 and the customization to another test environment. I also created the OrderHed fields and regenerated the Data model. However when I launch the form I am getting an error on two fields which are date fields. Here is my error:

I have double checked the added field formats in Order Hed match in both environments exactly. I have also double check the Date fields have the exact same properties. Has anyone experienced this before. I even tried remaking one from scratch and binding it in the second test environment and that didn’t work either.

Are Date and DateTime types interchangable?

I have no idea. Is there a setting somewhere?

Probably not your issue. I just checked and have some UD fields of type Date, and they are bound to EpiDateTimeEditor controls…

The error message mentions tbOrderProofDate. What is that?

The Proof Date is another Date field that is throwing the error as well.There were two and the setting between them are both the same. I just took a screenshot of the other one. It’s also weird becuase I have another field that was added that is a date field and it is bound to a date time field and it is working fine.

I’ve never bound custom controls to DataViews. Only ever to a db table.

Since it worked in Test Env#1, I’ll assume that’s okay to do. Not sure if maybe another Data Regen is required to let the view know the underlying table has changed …

Maybe I’ll try that again.

I regenerated for the second time and those two fields are still the ones throwing an error out. Same error.

Just as a test, try binding those two controls to the database table, instead of the dataview.

Or bind them to non-UD fields of type date. And see if binding them to a DateTime field (again, a non-UD field) does anything different.

Okay, that worked when I bound the exact same Date Time Field to OrderDtl.RequestDate. I didn’t get any errors and it worked fine. I think I will try deleting those fields I added. Regen the data model. Add the fields again and regen again.

one more thing… make a BAQ and double check that the values in the UD columns are valid Dates (or DateTimes)

There isn’t any data in there currently since the fields were just added.

No. I just ran a quick test because I was curious too.


From SQL:

does the working one have data in it? Dates are non-nullable, so it can cause problems without data.

1 Like

Some records have data.

I got it figured out.

I had to open the BAQ that contained those two fields. I removed them from the Display columns and then readded them. Once I readded them to the Query I loaded the Form again and voila they mapped fine.


Makes one concerned that the order of doing things can be more important than one thinks. And the order things are done during development are rarely the same as you do when you go to deploy.

Yes I was just discussing that with some of our other developers! It is going to be crazy when we move into our Production Environment.

A bit of a cross post here, but I found an issue with the datetimeeditor, but thought this was conversation was relevant to post into

Hope someone finds the information valuable.

1 Like