{"id":577,"date":"2022-05-27T09:37:26","date_gmt":"2022-05-27T08:37:26","guid":{"rendered":"https:\/\/ibex.tech\/csharp\/?p=577"},"modified":"2022-05-27T09:37:26","modified_gmt":"2022-05-27T08:37:26","slug":"verifying-datetime","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/c-sharp\/date-and-time\/verifying-datetime","title":{"rendered":"Verifying DateTime"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Convert string to DateTime without erroring on fail<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\t\/\/string MyString = \"2000-01-03T13:44:13\"\r\n\tDateTime MyTimestamp;\r\n\tif (DateTime.TryParse(MyString, out MyTimestamp))\t\t\t\/\/Returns true if conversion sucessful\r\n\t{\r\n\t\t\/\/Conversion was sucessful\r\n\t}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Convert string to DateTime without erroring on fail<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-577","post","type-post","status-publish","format-standard","hentry","category-date-and-time"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/577","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=577"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/577\/revisions"}],"predecessor-version":[{"id":579,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/577\/revisions\/579"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}