I have an Invoice date field but i need to create a new field where the date comes out as YYYY-MM. I started with Year([Invoice Date])&"-"&Month([Invoice Date]) but the Month does not retain the leading 0 so sorting on reports does not work, Next I tried var number YYYY = Year([Invoice Date]);var number MM = Month([Invoice Date]);(ToText($YYYY)) & "-" & (ToText($MM)) - same problem. Finally I found this formula in another post but it has errors in it. var text YYYY = Year([Invoice Date:]);var text MM = right("0" & ToText(Month([Invoice Date:]),2);$YYYY & "-" & $MM)Can anyone help me with a solution?
Question
How do I retain the leading 0 in a formula field coming from a date field?
This topic has been closed for replies.
Sign up
Already have an account? Login
Login to the community
Login with Quickbase US – quickbase.com Login with Quickbase EU – quickbase.eu
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.