Operating System - Linux
1745788 Members
3524 Online
108722 Solutions
New Discussion

Re: Single digit months to single digit?

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

Re: Single digit months to single digit?

Thanks!
Dennis Handly
Acclaimed Contributor

Re: Single digit months to single digit?

>the 'date "+%1m"' works perfectly, however come next month. which is 10 will the one be chopped off or will it remain 10?

The output of printf says it expands the field to contain the significant digits, it won't be truncated. Only %w.ps will truncate to the precision.