Convert date to UNIX timestamp

Hello, 

I am looking for a way to convert a regular date to a UNIX timestamp. 

Something like 

05/31/2017 > 1496267684

Is there an easy way to do it? 

Apologies for this stupid question but somehow I got stuck. 

Thanks a lot!

Andy 

Hi again, 

could solve it by using the Time Difference node wih fixed date of 01.01.1970 and counting the number of session passed since then. 

Best, Andy 

2 Likes

Hi Andy,

exactly what I would have proposed :)

By the way, our developers are heavily working on the new Date and Time Integration, which will have a dedicated node for the conversion.

Cheers, Iris

Hey Iris, 

Sounds great :)

Thank you!

BTW: Yesterday I finally bought the Selenium nodes :)

@Iris is there an update on this conversion tool? It would be pretty handy to be able to convert to UNIX timestamp.

Hi @Cakehole

yes we released the node than together with the Date And Time Integration.

https://hub.knime.com/knime/nodes/UNIX_Timestamp_to_DateTime*XqwrniivdtXbLzQu

Best wishes, Iris

3 Likes

@Iris that looks like it’s for converting UNIX time to date/time. What about date/time back to UNIX timestamps?

1 Like

This is possible with the Date and Time Difference node.

9 Likes

Ah! That works PERFECTLY!
Though…now that I look back at the thread, that’s exactly what @aherzberg was saying. Whoops! Sorry about that.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.