You can't do it from cmd. You need to use VBS, Js or PowerShell. Here's a simple VBS script that does what you want. Just create a shortcut on the desktop that runs this VBS file and assign a shortcut key to it
Set WshShell = WScript.CreateObject("WScript.Shell")
' Switch back to the previous window. Use Alt+Esc because Alt+Tab sometimes doesn't work
' WshShell.SendKeys "%{TAB}", True
WshShell.SendKeys "%{ESC}", True
' Get the time string
Dim dt, datetime_str
dt = now
datetime_str = Year(dt) & Right("0" & Month(dt), 2) & Right("0" & Day(dt), 2)
datetime_str = datetime_str & " " & Right("0" & Hour(dt), 2) & Right("0" & Minute(dt), 2)
' Send the date string to the target window
WshShell.SendKeys datetime_str
However Autohotkey (AHK) would be a much better solution and works much faster. Here are 2 example functions that will type the datetime string to the current app
; Map Ctrl+Alt+T to send the date string
^!t::
FormatTime, currentdate,, yyyyMMdd HHmm
SendInput %currentdate%
Return
; Map Ctrl+Alt+D to send the date string
^!D::
SendInput %A_YYYY%%A_MM%%A_DD% %A_Hour%%A_Min%
Return
Save the above script as *.ahk and run it. AHK will run in the background and listen to the key sequence to do the desired action