Reputation: 3401
I am parsing below string value into OData query through java code.
objects.put("EndDate", "\/Date(1441756800)\/";
How can i parse the /Date(1441756800)/ into a string in java.
I have tried with below :
objects.put("EndDate", ""\\""//"Date(1441756800)""\\""//"";
throws error:(
Upvotes: 0
Views: 4950
Reputation: 124275
I never used OData so I may not understand your question correctly, but if you are asking how to write \/Date(1441756800)\/
as String then you need to escape \
as it is String special character (used for instance when escaping or when creating other special characters like line separators \n
).
So try with "\\/Date(1441756800)\\/"
Upvotes: 1