what is the meaning of %02d and %04d ??
you understand what %d
? The number simply indicate the number of decimals you want to display.
i dont understand what it s use in displaying date time year month etc
some times %04d is used and other time %02d how to get to know what to use when ?
the year is 2018, that is four digits which is why we use %04d
, while the month is April, which is the 4th month (04), which we want to display with 2 digits.
1 Like