-2

I've looked at the man page for "date" and I can't figure out how to change the year. I know there is some string you need to create to describe the date format but how do I use that?

travis1097
  • 113
  • 1
  • 3

1 Answers1

3

%Y is the format character for year

for example:

date +%Y%m%d -s "20120502"
mulaz
  • 10,472
  • 1
  • 30
  • 37