linux - how to convert number into date in unconventional format -


i have text file record dates in american format(mmddyy, e.g 070715). wondering if there easy way convert date, need date calculation. notice there date command allow convert string date ( date -d "string") can read date in ways. may able substring manipulation convert desired format, seems there should lot more simple way that.

using bash string manipulation can do:

s='070515' date -d "20${s: -2}-${s:0:2}-${s:2:2}" sun jul  5 00:00:00 edt 2015 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -