We are getting a date from an API in string and the format is RFC3339
. I need to convert this into a timestamp in this format 20-MAR-22 12.00.00.00.000000000 AM
I tried using Timestamp.valueOf(objUs.getUserAcptDate)
but here we are getting an exception.
I found by searching online RFC3339 is in this formate "2019-10-12T07:20:50.52Z"
or it may be without T
.
How can we convert the coming string from API into a timestamp and this is the formate which we are saving in DB 20-MAR-22 12.00.00.00.000000000 AM