Go to Setup > Company Details > Running No.
There will be one default Running No. registration for each document, you may choose to edit the existing registration, register a new one with a custom format, or leave it be.
Formula:
[YY] = display year in 2 digits, e.g. 11
[YYYY] = display year in 4 digits e.g. 2011
[MM] = display month in 2 digits, e.g.08
[DD] = display date
[0000] = 4 digits running nos., [000000] = 6 digits running nos. etc.
"Reset" field allows you to set how frequently the Next Number will be reset to "1".