0
votes

I have a Reservation table in the SQL Server DB, with a field 'dailySummaryEmailTime' with data type time(7). From the UI which is done with angular and breeze for data management, I set a value like "15:30" which gives me a breeze validation error as "'dailySummaryEmailTime' must be a ISO8601 duration string, such as 'P3H24M60S'"

This is when I call the saveChanges() in breeze. How do I overcome this? Before calling saveChanges() do I have to modify the value?

2

2 Answers

0
votes

The error message is descriptive of the the issue, "15:30" is not a valid ISO8601 duration string and breeze maps all properties of the 'Time' datatype to ISO8601 durations.

So you need to actually set the property to a valid ISO8601 duration string.

There are libraries that can assist with creating and interpreting ISO durations like: https://www.npmjs.com/package/moment-duration

0
votes

U rather use this tag Or you can use any jQuery controllers for time while doing input to your page. take a look on this link

http://best-jquery-time-picker.com/

As the problem which is occurring is time conversion and the SQL Db will not accept the time if it is not in particular format. Hence you are not able to save data.