Ok even if I convert it long format, how I can use that in compare expression

Assuming data as below,
{"id":"5","eventId":"Event4","intField":400,"currentDate": 
1471254472000,"legalDate": 1471254472000}

select e from /Event e where to_date(e.currentDate,'yyyy/MM/dd') > 
to_date(‘2018/02/20’,’yyyy/MM/dd’) from /Event e

Query is invalid due to error - Syntax error in query- expecting StringLiteral, 
found 'e'

Regards,
Dharam

From: Gang Yan [mailto:[email protected]]
Sent: Thursday, May 11, 2017 8:11 PM
To: [email protected]
Subject: Re: How to handle string as java date type

hi  Dharam

maybe you can try to_date.

but for reason of performance, I think that you can choose a long to represent 
a date value instead of a string.


Thanks and regards

Gang Yan(闫钢)
Sr. Solution Architect
Customer Success, Pivotal Great China
Mobile:+86 13636347460
[email protected]<mailto:[email protected]>

2017-05-11 21:43 GMT+08:00 Thacker, Dharam 
<[email protected]<mailto:[email protected]>>:
Hi Team,

Is there any good way to play with DateType if I have PdxInstance data having 
date string with type [java.lang.String]?

Example:
"duedates": {
                "legalDate": "2022-04-19",
                "currentDate": "2022-04-19",
}

My goal is to get results based on date comparison,

select i from /Event i where i.duedates.legalDate > ‘2022-04-15’

Thanks & Regards,
Dharam

This message is confidential and subject to terms at: 
http://www.jpmorgan.com/emaildisclaimer<http://www.jpmorgan.com/emaildisclaimer>
 including on confidentiality, legal privilege, viruses and monitoring of 
electronic messages. If you are not the intended recipient, please delete this 
message and notify the sender immediately. Any unauthorized use is strictly 
prohibited.


This message is confidential and subject to terms at: 
http://www.jpmorgan.com/emaildisclaimer including on confidentiality, legal 
privilege, viruses and monitoring of electronic messages. If you are not the 
intended recipient, please delete this message and notify the sender 
immediately. Any unauthorized use is strictly prohibited.

Reply via email to