Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Convert datetime to unix/epoch format

$
0
0

Hi everyone,

 

I would like to know if there is a way to convert a datetime value stored in a variable to unix/epoch format.

I found several ways to do the opposite, but found nothing helpful on how to achieve this.

 

A script in a job contains a variable, say $datetimevar.

This is loaded using SQL to hold a value such as '2016/01/06 18:12:00'.

 

I would like to know if there is a way we can convert this value to epoch/unix format and hold it in, say $datetimevar_unix.

 

Any help would be appreciated.

 

Regards,

Sid


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>