on 04-07-2016 8:39 AM
Hi Experts,
I working with smart forms and smart filter bar. I am using the below json data. When i execute, its throwing the error "invalid date/time".
[
{
"Risk": "Confidential emails",
"RiskCategory": "IT Security",
"RiskLevel": "Very High",
"RiskValidFrom": "2014-01-01T00:00:00",
"RiskValidTo": "2014-01-01T00:00:00",
"Process": "IT",
"SubProcess": "NOC",
"Product_Service": "Advisory",
"LineofBusiness": "Investment Bank",
"RiskOwner": "James Smith"
},
{
"Risk": "Credit Card Data Leakage",
"RiskCategory": "IT Security",
"RiskLevel": "Very High",
"RiskValidFrom": "2014-01-01T00:00:00",
"RiskValidTo": "2014-01-01T00:00:00",
"Process": "Sales",
"SubProcess": "Customer Solutions",
"Product_Service": "Advisory",
"LineofBusiness": "Investment Bank",
"RiskOwner": "Ruan Jones"
}
]
Please help me to resolve this.
Hi Gowtham,
What is the data type of Date field in the OData Service? Ideally it should be Edm.DateTime. For such data types you need to pass date as Date Object. Use as below and it should work.
"RiskValidFrom": "/Date(1449039257586)/"
Here, I have given the date in milliseconds. You can get human readable date by using -
new Date(1449039257586).
BR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you remove the time? and have a short date? if not.. you may need to change your string into a date type, such as new Date() or new Date(<whatever date you need>)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
does the rest of the data displayed properly ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.