samedi 7 février 2015

reset number on year change



I am using the following formula to increase the 4 rightmost numbers of the myfield


to the next multiple of 10


2014-1100 . Next number is 2014-1110


number(substring(myfield; 6; 4)) - (number(substring(myfield; 6; 4)) mod 10) + 10


It is working well, but i would like it to reset the right most 4 numbers to 0000 when the year changes, i.e when 2015, then it should start 2015-0000


Thanks








0 commentaires:

Enregistrer un commentaire