{"id":230,"date":"2006-12-29T14:04:22","date_gmt":"2006-12-29T13:04:22","guid":{"rendered":"http:\/\/www.galhano.com\/blog\/?p=230"},"modified":"2008-02-07T18:37:21","modified_gmt":"2008-02-07T17:37:21","slug":"validar-data-em-aspnet-c","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=230","title":{"rendered":"Validar Data em ASP.Net (C#)"},"content":{"rendered":"<p>The Namspace used in the demonstration is System.Globalization<\/p>\n<p>Step 1: main.aspx<\/p>\n<p>Private Sub btnValidate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnValidate.Click<\/p>\n<p>Try<\/p>\n<p>Dim myDateTimeUS As System.DateTime<\/p>\n<p>Dim format As New System.Globalization.CultureInfo(&#8220;en-US&#8221;, True)<\/p>\n<p>myDateTimeUS = System.DateTime.Parse(txtDate.Text, format)<\/p>\n<p>Response.Write(&#8220;Valid Date&#8221;)<\/p>\n<p>Catch ex As Exception<\/p>\n<p>Response.Write(ex.Message)<\/p>\n<p>Response.Write(&#8220;Not Valid Date&#8221;)<\/p>\n<p>End Try<!--eb1c3582418e6171fcd557db2a2b2959--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Namspace used in the demonstration is System.Globalization Step 1: main.aspx Private Sub btnValidate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnValidate.Click Try Dim myDateTimeUS As System.DateTime Dim format As New System.Globalization.CultureInfo(&#8220;en-US&#8221;, True) myDateTimeUS = System.DateTime.Parse(txtDate.Text, format) Response.Write(&#8220;Valid Date&#8221;) Catch ex As Exception Response.Write(ex.Message) Response.Write(&#8220;Not Valid Date&#8221;) End Try<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-aspnet","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":0,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}