For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi All,
In ROQL I have received date/time in string format. So I converted into date/time in (MM:DD:YYYY HH:MM") format.
After that, I need to store the converted date/time value in "Date/time" datatype custom field.
While I am trying to store the converted value in date/time datatype field, I am getting error like "Type Mismatch"
How to resolve this?
Thanks,
Seethalakshmi
Comment
Hey Seethalakshmi,
Try this:
Average Rating:



2 ratings
|
Sign in to rate this
Hi Vlad,
Thanks for the quick response.
I am getting "Min Value Exceeded error"
I have attached screenshot for your reference.
Average Rating:



1 rating
|
Sign in to rate this
Looks like you are not adding a valid date/time value. The key thing here is that you have to pass the value in UNIX timestamp. I am not sure what you set $new_date to prior to the code you pasted, but try this as a test:
Then:
Average Rating:



2 ratings
|
Sign in to rate this
Hi Vlad,
In ROQL, I have received date/time "2018-12-12T09:58:00Z " in this format.
I have formatted the date/time into "12-12-2018 09:58 PM" by using the below date format,
$newDateTime = date(' n-j-Y-h:i A', strtotime($currentDateTime));
I have attached screenshot for you reference. The result which I stored in "Custom Text Field"
Here I need to pass the date value into "Date/Time" custom field.
Average Rating:



1 rating
|
Sign in to rate this
Both these should work in your case.
Try echoing strtotime($currentDateTime) and strtotime($newDateTime), make sure they are valid UNIX timestamps (e.g. 1544608680)
Average Rating:



1 rating
|
Sign in to rate this
Hi Vlad,
I am getting UNIX timestamp value.
How to convert and store the unix timestamp value in date/time custom field?
Average Rating:



1 rating
|
Sign in to rate this
I too got this error in recent times..I went with the documentation example of using mktime()....check PHP API documentation
~Suresh
Average Rating:



1 rating
|
Sign in to rate this