You say both have the same error, but what is the error, what does it say ?
Debian is not Opensuse, neither is Ubuntu, so it is logical that a command that works on opensuse might not work on either other distro.
Also, for Debian, see the manual for date:
Your operands don't look right to me, the error message should clarify on that, but you do not show it.
Also it really is not clear what you are trying to do,
what output you expect or want,..
Here is one example:
Code: Select all
garry@debian:~$ date -d "20191103" "+%d%m%y"
031119
garry@debian:~$
Or is this what you want ?
Code: Select all
garry@debian:~$ date -d "20191103" "+%y%m%d"
191103
garry@debian:~$
Or this :
Code: Select all
garry@debian:~$ date -d "20191103" "+%Y%m%d"
20191103
garry@debian:~$
Do you need more examples ?:
Code: Select all
garry@debian:~$ date -d "20191103" "+ %d %m %Y"
03 11 2019
garry@debian:~$
======
Code: Select all
garry@debian:~$ date -d "20191103" "+ %D %M %Y"
11/03/19 00 2019
garry@debian:~$
You can try even more various methods, and see what the out put is, if none of the above are what you want.
To sum it up, the syntax that you claim works on opensuse, will not work on Debian, ... But yes, even on Debian, one can get the output with 03, as the day,..if they take the time to read a little, ...I did not know the answer when I started, but a quick search, and a few trial by error, combined with reading the manual, ...just goes to show.
I am not familiar with opensuse, but I find it hard to believe that syntax even works on opesuse.