Note: This highly depends on what your goal is.
If the compilation is simple:
Start with copying the compiler command. If the compiling command is using alias, you must dereference it. If it uses chaining, you must do so for each element. You then replace the jobname by the date given from your commandline. In this example, I use pdflatex as compiler:
Linux: sh -c "pdflatex -synctex=1 -interaction=nonstopmode -jobname=$(date +'%%F').% %.tex"
Windows: cmd /C "pdflatex.exe -synctex=1 -interaction=nonstopmode -jobname=%%date%%.% %.tex"
Note that you might have to adjust the path to the pdflatex executable.
Edit: Apparantly windows cannot read the variable from instanced shells. :-(
So here's universal variation Using the write18 command (for linux use sh -c instead of cmd /C)
windows portable: cmd /C ""[txs-app-dir]"/../../texlive/2019/bin/win32/pdflatex.exe -shell-escape \immediate\write18{"[txs-app-dir]"/../../texlive/2019/bin/win32/pdflatex.exe\space -jobname=\the\year-"%"\space "%.tex"}"
windows installed: cmd /C "pdflatex.exe -shell-escape \immediate\write18{pdflatex.exe\space -jobname=\the\year-"%"\space "%.tex"}"
If the compilation is complex:
You might call TeXStudio from a commandline, where the date or the jobname is setup as a variable. either do so directly or call TeXStudio from within itself over a helper-script or over the commandline. Then it might be possible to call it like this:
Linux: sh -c "export jobname=$(date +'%%F').%; /path/to/texstudio %.tex"
The compilation would then be done by:
txs:///compile/[-jobname=$jobname]
Note that while you can export variables like this, you cant just chain it, as TeXStudio drops the variable. Also while you can save the date into a file with this:
sh -c "echo '"$(date +'%%F').%"' > timestamp.txt" I have yet to find a way to read it into a variable in TeXStudios internal calls. And while you can do a lot with overwriting the jobname in the first line and setting up a magic comment for it in the second line, it's not complete and my gut tells me that it would be fairly stupid indeed.
If the goal is just to rename the PDF
Do so afterwards. Just build a (chain-)command like this:
Linux: txs:///compile | sh -c "mv %.pdf $(date +'%%F').%.pdf"
Windows: txs:///compile | cmd /C "move %.pdf %%date%%.%.pdf"
Note we had to escape to the commandline to get the date.
The %%F will give you yyyy-mm-dd. You can replace it with any combination of %%Y or (4-digit/2-digit years) %%m (2-digit month) and %%d (day) separated by dash, underscore or dot. So year-only would be %%Y.
Sadly for windows the format of date is highly dependant on your regional settings.
If you have Python or powershell installed, you may want to use them to get the timestamp instead.
If the goal is to abuse the jobname for Variables
(Just for completenes sake. Irrelevant here.)
It might be tempting to abuse the jobname to transfer variables.
Let's say you want to compile some exercises with or without solutions, and maybe for four different groups or something. For that it should be enough, to just create links to your main file, and then open and compile the links instead. Eventhough I said abuse the jobname this is fairly handy and may easily be considered a feature.
To sum it up:
Rebuilding your compiler-setup with custom cmd- or sh-calls like in the first solution might be the best idea.
After that, the next best idea might be calling TeX-Studio from commandline with a variable predefined. Trying to pull that from within TexStudio would be hard, so dont.
While the approach by user187802 should work here, it might be better suited for larger problems, and/or if you have a fixed installation. (The first and third approach here works for portable setups too.)
Finally [txs-app-dir] and [txs-settings-dir] may be helpfull when using portable installations.