We have moved to www.dataGenX.net, Keep Learning with us.

Sunday, November 09, 2014

TimeStamp Comparison in Linux


Comparing Date, Time or TimeStamp is tricky thing in Linux. This is how you can achieve this -


By converting date to Seconds
$ date +%s
the above command will current time in seconds since 1970-01-01 00:00:00 UTC

if you have time in string form you can use below command to convert them like -
$ date -d "$ts" +%s                #where ts is containing the date or timestamp
i.e -


Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you

https://twitter.com/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098


No comments :

Post a Comment