I need your help, because i'm struggling with formatting date and time
The situation looks that I need year, month, day, hour and minute and I want to use node-red-contrib-iiot-ntptime for taking date and time. I need present those values as binary numbers. For example:
-actual year: 2023, binary 0001 0111 (eliminate "20");
-actual month: 04, binary 0100 0000;
-actual day: 09, binary 0000 1001;
-actual hour: 18, binary 0001 0010;
-actual minute: 45, binary 0010 1101
Now I need to combine year+month, getting 0100 0000 0001 0111;
day+hour: 0000 1001 0001 0010;
minute: 0010 1101 0000 0000
At the end, these binary numbers are to be converted to decimal, so it should be 16407, 2322 and 11520.
I know it's complicated, but I have tried to describe the problem simply and in detail and hope someone will help me. Also I've tried do my own way, but all I can do is take values from ntp time and convering it into binary.