{"id":5778,"date":"2018-09-22T13:17:51","date_gmt":"2018-09-22T11:17:51","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=5778"},"modified":"2018-09-24T16:17:45","modified_gmt":"2018-09-24T14:17:45","slug":"powershell-convert-unix-timestamp-to-datetime","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/powershell-convert-unix-timestamp-to-datetime\/","title":{"rendered":"Powershell: Convert UNIX Timestamp to DateTime"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_5778 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_5778')){$('.twoclick_social_bookmarks_post_5778').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Powershell%3A%20Convert%20UNIX%20Timestamp%20to%20DateTime\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Asimple%20one%20liner%20to%20convert%20an%20UNIX%20Timnestap%20to%20DataTime%20object.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/powershell-convert-unix-timestamp-to-datetime\\\/\",\"post_id\":5778,\"post_title_referrer_track\":\"Powershell%3A+Convert+UNIX+Timestamp+to+DateTime\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>simple one liner to convert an UNIX Timnestap to DataTime object.<br \/>\n<!--more--><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; $oUNIXDate=(Get-Date 01.01.1970)+(&#x5B;System.TimeSpan]::fromseconds(1537615930))\r\nPS D:\\&gt; $oUNIXDate\r\nSamstag, 22. September 2018 11:32:10\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, simple one liner to convert an UNIX Timnestap to DataTime object.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[344],"tags":[1239,133,147,1238,20],"class_list":["post-5778","post","type-post","status-publish","format-standard","hentry","category-powershell-scripting","tag-datatime","tag-powershell","tag-to","tag-unix-time","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=5778"}],"version-history":[{"count":1,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5778\/revisions"}],"predecessor-version":[{"id":5780,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/5778\/revisions\/5780"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=5778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=5778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=5778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}