{"id":698,"date":"2017-04-07T10:17:49","date_gmt":"2017-04-07T09:17:49","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=599"},"modified":"2022-09-13T15:43:05","modified_gmt":"2022-09-13T14:43:05","slug":"date-time-2","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/date-and-time-uwp-programming-in-c\/date-time-2","title":{"rendered":"Date &amp; Time"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Loading DateTime With A Time<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tDateTime DateTime1 = new DateTime(\n\t\t\t\t\t\t\t1979,      \/\/ Year\n\t\t\t\t\t\t\t7,        \/\/ Month\n\t\t\t\t\t\t\t28,        \/\/ Day\n\t\t\t\t\t\t\t22,        \/\/ Hour\n\t\t\t\t\t\t\t35,        \/\/ Minute\n\t\t\t\t\t\t\t5,         \/\/ Second\n\t\t\t\t\t\t\t15        \/\/ Millisecond\n\t\t\t\t\t\t\t);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">DateTime Now<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tDateTime DateTime1 = DateTime.Now;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Setting DateTime Value<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code> \tDateTime1 = CurrentDateTime;     \/\/Start with DateTime now\n\n\t\/\/Force DateTime1 mins and seconds to 59\n\tDateTime1 = new DateTime(\n\t\t\tDateTime1.Year,\n\t\t\tDateTime1.Month,\n\t\t\tDateTime1.Day,\n\t\t\tDateTime1.Hour,\n\t\t\t59,\n\t\t\t59,\n\t\t\t999);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Loading DateTime With A Time DateTime Now Setting DateTime Value<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[138],"tags":[],"class_list":["post-698","post","type-post","status-publish","format-standard","hentry","category-date-and-time-uwp-programming-in-c"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=698"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/698\/revisions"}],"predecessor-version":[{"id":1193,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/698\/revisions\/1193"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}