You are here

How to convert time format

3 posts / 0 new
Last post
Maddy
Offline
Joined: 6 years
Last seen: 11 months
How to convert time format

Hello admin,

I need help, I am trying to create site.ini for one of the website where i need to convert time to read the link and grab epg.

Please help me converting "1532615400000" into dd/mm/yyyy hh:mm:ss format.

Thanks in advance.
Maddy

Maddy
Offline
Joined: 6 years
Last seen: 11 months

Thanks Blackbear199,

This is really helpful, however my epg link is stable (it doesn't need any "urldate").

All I need is to convert the date and time in appropriate format so that WebGrab++ can read.

Below is the sample where I have created the date or was not getting the date in proper format.

serverDate": is the parameter from where I am reading the date which is in "2018-07-31T00:00:00+05:30" format.

index_temp_1.modify {regex||serverDate":(.*?),"||}
index_temp_2.modify {calculate(format=date,dd)|'index_temp_1'}
index_temp_3.modify {calculate(format=date,MM)|'index_temp_1'}
index_temp_4.modify {calculate(format=date,yyyy)|'index_temp_1'}
index_temp_5.modify {'index_temp_2'/'index_temp_3'/'index_temp_4'}

So technically index_temp_5 = dd/MM/yyyy

for above I'm getting results as 31/07/2018 which is correct according to my ini.

Now...

I have something like

startEpoch: 1532975400000
endEpoch: 1532979000000

Which I need to convert into "dd/MM/yyyy hh:mm:ss" so that I can read the EPG.

Thanks
Maddy

Freneticus
Offline
Joined: 5 years
Last seen: 5 years

Hello,
its Vlad
I am trying to solve this for almost two years now but I still cant manage to get it work.

I get date time format in this :
20191209004500 +0100

And I cant convert it to something like : dd.mm.yyyy hh:mm

Does anyone have clue please if its even possible ?

Thank you

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl