Is there an opportunity to convert a string into a date in bash? For example: I have a time format: "%Y-%m-%dS%H:%M:%S"
. An example of such string is "2009-06-24S12:34:56"
. I need to convert this string into a date (unix timestamp) in bash. How can I do this?
Use
date --utc --date "<input string>" +%s
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With