add this following or preceding your line
`date "+%Y-%m-%d"` e.g. 2016-04-26
in your code
printf "this is the output\t`date "+%Y-%m-%d"`"
will read as:
this is the output 2016-04-26
you can use this with
you can do others like:
`date "+%b%d"` e.g. Apr-26
for other formats check
` (Back Quotes) : Command Substitution
The ` character (found on the key with the ~) is very important when used in shell commands. This ` indicates that command substitution is required wherever it is used. Hence whenever ` is used, whatever part of the command is enclosed by these Backquotes marks would be executed (as if it was the only command) and then the result of that command would be substituted in the original shell command that you typed. The following explains this clearly
man dateand read.
ts(from moreutils) can do this easily.