cancel
Showing results for 
Search instead for 
Did you mean: 

The given date instance isn't valid

Former Member

my view code:

<ObjectAttribute

title="{i18n>dateTitle}"

text="{

path: 'invoice>ShippedDate',

type: 'sap.ui.model.type.Date',

formatOptions: {

style: 'long',

source: { pattern: 'yyyy-MM-ddTHH:mm:ss' } } }"/>

ShipppedDate information:

<d:ShippedDate m:type="Edm.DateTime">1997-10-13T00:00:00</d:ShippedDate>

when i run my project , the erroe occured,the error information is :The given date instance isn't valid

please give me a hand,thank you!

View Entire Topic

it's means you Date type field haven't nullable attribute, you should go to your entity and set Nullable = true

MohamedNowfal
Explorer
0 Kudos

Thanks it worked add like below

value="{
path: 'oLeaveData>/leaveFormData/leaveEnd',
type:'sap.ui.model.type.Date',
formatOptions: {
style: 'medium',
strictParsing: true
},
nullable: 'true'
}"