I want to make something like that using formula
The years are changing according to this year
I am a completely Beginner
Thanks for your help !
You can piece it together with the following bits. See the CR help text for all the functions below if you don't understand how they work or want more details.
DateAdd()
function will allow you to add or subtract certain units of time to/from a DateTime. For example, if you want to get the date three years ago, you can use DateAdd('yyyy',-3,CurrentDate)
ToText()
function. To only print the year portion of the DateTime field, you can use ToText(CurrentDate,'yyyy')
which will give you '2014'chr(13)
. Concatenate that onto a string to print a newline wherever you'd like.EDIT: Since you already implemented it in C#, here's one possible CR solution:
" : " + totext(dateadd('yyyy',-3,currentdate),'yyyy') + chr(13) +
" : " + totext(dateadd('yyyy',-2,currentdate),'yyyy') + chr(13) +
" : " + totext(dateadd('yyyy',-1,currentdate),'yyyy')