Project

General

Profile

Timestamp to Date?

Added by ThomasDr about 3 years ago

Hello,

I have a Device with the Value1 is a UNIX Timestamp.
I want convert the Value1 to Date and Time, and set Value2 to that.

I look at scripts, but i don't find a solution.
My Timestamp is 1467475607, and Time give me 22:00:00.
What do the Date and Period Funktion, i can't find a manual.

I can write my own php script, but how get the Value of a device in my Script?

regards
Thomas


Replies (3)

RE: Timestamp to Date? - Added by wwolkers about 3 years ago

Try this:

DateAdd(CDate("1/1/1970"), gb.Second, Value1)

RE: Timestamp to Date? - Added by ThomasDr about 3 years ago

Hello,

where do I write this?

At time i use json to get the Value in php and write back with json.

regards
Thomas

RE: Timestamp to Date? - Added by wwolkers about 3 years ago

In the correction field

    (1-3/3)