How to get the last two digits of the current year？
My invoice number format is INV-819001 where 19 is the last two digits of the current year.
what code should I use to get it?
thank you very much
Hello. Suppose that "Invoice N. " is the field (text format) where you enter the invoice number:
substr('Invoice N.', index('Invoice N.', "-") + 2, 2)
Hi thank you. But I am actually looking for a method that can get the last two digits of the current year.
ie 2018 => 18
2019 => 19
thank you for helping!
Hi. Try this:
Hi, I tried, but it keep saying: field not found:YY
the following is my code
let y := year('Invoice Date');
let c := cnt(select Invoice where year('Invoice Date') = y);
'Invoice No' := format(today(), “YY”) + "-" + format(c, "000")
Could you help me to check？
Change the quotes for YY. See how they are different than the quotes in Fabio’s example.
didn't see the differences before. Thank you very much!