GMT Offset time format to timestamp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GMT Offset time format to timestamp

deepak nigam-2
Hello all,

I have a date in the format yyyy-mm-ddThh:mm:ss.nnn+time zone
(2019-07-28T00:00:00.000+05:30), I need to convert it to Timestamp object
so that I can store in one of the OFBiz entity. Is there any OOTB feature
available for this?

Thanks & Regards
--
Deepak Nigam
Reply | Threaded
Open this post in threaded view
|

Re: GMT Offset time format to timestamp

Jacques Le Roux
Administrator
Hi Deepak,

Have a look at UtilDateTime::stringToTimeStamp methods

Jacques

Le 27/08/2019 à 17:02, Deepak Nigam a écrit :

> Hello all,
>
> I have a date in the format yyyy-mm-ddThh:mm:ss.nnn+time zone
> (2019-07-28T00:00:00.000+05:30), I need to convert it to Timestamp object
> so that I can store in one of the OFBiz entity. Is there any OOTB feature
> available for this?
>
> Thanks & Regards
> --
> Deepak Nigam
>
Reply | Threaded
Open this post in threaded view
|

Re: GMT Offset time format to timestamp

Nicolas Malin-2
In reply to this post by deepak nigam-2
I used this on customer site :

date = UtilDateTime.stringToTimeStamp(dateStr,
"yyyy-MM-dd'T'HH:mm:ss'Z'", timeZone, locale);

Nicolas

On 8/27/19 5:02 PM, Deepak Nigam wrote:

> Hello all,
>
> I have a date in the format yyyy-mm-ddThh:mm:ss.nnn+time zone
> (2019-07-28T00:00:00.000+05:30), I need to convert it to Timestamp object
> so that I can store in one of the OFBiz entity. Is there any OOTB feature
> available for this?
>
> Thanks & Regards
> --
> Deepak Nigam
>