0

Calculate start date in XTRF API

Norbert Grabowski 2 years ago in API updated 2 years ago 2

Hi,

I want to create projects with the XTRF API. I have taken an existing project and read out the project details with https://Xxx.xxxx.xxxx/home-api/projects/3738. I get as start date the value 1673433060000 and as delivery date 1673539200000. how to convert the values to a normal date format. The real start date is 11.01.2023 11:31 CET.

Hi Norbert,

looks, like this is the Unix Timestamp which you can convert to a GMT timestamp. There are plenty of online tools as well as some libraries for your code.

https://www.unixtimestamp.com/

Best regards,

Christian

Hi Christian, 

I should have thought of it myself. I actually do most of my programming in Python. That should help.

import time
import datetime
d = datetime.date(2015,1,5)

unixtime = time.mktime(d.timetuple())

Thanks for your quick answer

Best regards

Norbert