I have the following format of Date which is a database query result:
yyyy-mm-dd-hh.mm.ss.mmmmmm
example
myDate=2014-03-28-23.05.04.000000
I tried
$(( ( $(date +%s) - $(date -d "${myDate}" +%s) ) /(24 * 60 * 60 ) ))
But it gives me date not valid error.
I want to find out how many days its been since myDate. I need to have the result not rounded up or down as an example the result could be 2.5 days or 1.6 etc. based on the number of hours, minutes and seconds.