Updating a table based off a data selection

Make sure on the Popup Calendar that the Time Style is set to Start of Day.

I would also disable the Show Time property to prevent users from typing in a time.

The problem here is that the time delivered to the binding does not match any rows in the table. The reason that the original sql query works is because the where clause effectively resolves to true, meaning that all records would be returned.

If this doesn’t work you may need consider using a between filter for the last hour.

It is also possible to set the time in the date to match that in the database via scripting, using system.date.setTime

That worked… everything is working as it should…

Consider using a custom string property with expression binding to get the date formatted exactly how the DB expects, without any time. Use that custom property in the binding.

Even better would be to use custom date properties with expressions to get the precise start and end timestamps that are applicable, and pass them without string conversion directly to the DB via Named Query parameters.

1 Like

Great, I am glad you got it to work.

Upon further inspection, I would recommend that you change the data type in the DB to be a datetime type, modify the script in the submit button from using the ‘Text’ property to the ‘Date’ property.

Another option would be to use the ‘Text’ property in the binding. You should always use the same properties to write to the database and filter the database so you don’t end up with this type of mismatch unexpectedly.

Those changes probably would have lessened some of the confusion that was seen here.