>say i've got yyyy/mm/dd or yy/mm/dd or mm/yy/dd or mm/yyyy/dd
>i 've to do calculations on year part and return the date in the same format as it was given to the function.
You can use GOMONTH() or convert the date to a string with DTOC(), cut out the year using RIGHT or LEFT, do your operation then rebuild the string and convert it back to a date using CTOD(). I prefer to just use GOMONTH() and pass a value 12 times the number of years I want to move. I did this to calculate the Thai year which is 2541. ;)
Eric K.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement