you can build your own date utility wrapper to extract out all the components. from there, you can make it however you like it :
echo 123 abc \
\
| mawk 'function dateinfo(_,__,___) {
___=RS
RS="\n"
(_=(_=substr("gdate",2^(_!~"^[Gg]([Nn][Uu])?$")))\
" +\47-"(_)"-:%Y:%m:%d:~:%B:~:-weeknum-:%U:"\
"-julian-:%-j:-dayofweek-:~:%A:%w:-time-:~:%T:"\
"~:-epochs-:~:%s:"(_~"^g"?"%N":"000000000")":~:"\
"-timezone-:~:%z:%Z:~\47") | getline __;
return \
\
printf("%.*s%s",close(_)<"",RS=___,__)
} {
printf("\n{%s}\n\t{%s}\n\n\t{%s}\n\n",
$0,dateinfo(),dateinfo("gnu")) }'
{123 abc}
{-date-:2022:03:30:~:March:~:-weeknum-:13:-julian-:
89:-dayofweek-:~:Wednesday:3:-time-:~:14:36:04:~:
-epochs-:~:1648665364:000000000:~:-timezone-:~:-0400:EDT:~}
{-gdate-:2022:03:30:~:March:~:-weeknum-:13:-julian-:
89:-dayofweek-:~:Wednesday:3:-time-:~:14:36:04:~:
-epochs-:~:1648665364:208758000:~:-timezone-:~:-0400:EDT:~}
Here I've made it also added in a feature to auto detect whether it's BSD-date
or GNU-date
. Adjust it accordingly to how you name it in your system.
This way you don't need to make a stack of calls to date - just call it once, and extract the components as you see fit.
And if you like to take one-liner concept to the extreme, then put everything inside a sprintf() statement like this :
mawk2 'function usectime(_,__,___) {
\
return \
\
sprintf("%.0s%.0s%s",(__=substr((RS="\n"substr(\
_="",_<(___=RS)))"gdate +%s%6N",!_+!_)) | getline _,
close(__)^(RS=___),_)
} $!_=usectime()' <<<'' | lgp3
1648666841181253