Get date and time on the same line

Try the following (PowerShell):

Get-Date -Format G

27.11.2013 17:10:23

The format is defined with the system’s regional settings, so for me this is what I get, but if you’re regional date/time format is what you want, it should show up like you want.

(Get-Date).ToString()

would probably also work.

UPDATE:

"Date and time is: $((Get-Date).ToString())"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)