ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Split Number into Date and Time using C# and VB.Net<p>Hey <a class="username" rel="akhter">akhter</a>,</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { string str = &#34;201812140444&#34;; DateTime date = Convert.ToDateTime(str.Insert(4, &#34;-&#34;).Insert(7, &#34;-&#34;).Insert(10, &#34; &#34;).Insert(13, &#34;:&#34;)); Response.Write(date.ToString(&#34;dd-MM-yyyy hh:mm:tt&#34;)); }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load Dim str As String = &#34;201812140444&#34; Dim datee As DateTime = Convert.ToDateTime(str.Insert(4, &#34;-&#34;).Insert(7, &#34;-&#34;).Insert(10, &#34; &#34;).Insert(13, &#34;:&#34;)) Response.Write(datee.ToString(&#34;dd-MM-yyyy hh:mm:tt&#34;)) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Output</strong></span></p> <p>14-12-2018 04:44:AM</p>https://www.aspforums.net:443/Threads/108977/Split-Number-into-Date-and-Time-using-C-and-VBNet/https://www.aspforums.net:443/Threads/108977/Split-Number-into-Date-and-Time-using-C-and-VBNet/Fri, 14 Dec 2018 05:24:25 GMT