-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?

1 Answer 1

3

%Y is the format character for year

for example:

date +%Y%m%d -s "20120502"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .