This code snippet shows how to convert string to date.

DateTime.Parse can be used to convert datetime string to DateTime type in C#/.NET.

Code snippet

var dateString="2017-10-15";
var date=DateTime.Parse(dateString);
Console.WriteLine(date);
Console.ReadLine();
info Last modified by Raymond at 2 years ago * This page is subject to Site terms.

More from Kontext

local_offer csharp local_offer dotnet

visibility 34
thumb_up 0
access_time 8 months ago

JSON is commonly used in modern applications for data storage and transfers. Pretty much all programming languages provide APIs to parse JSON. 

open_in_new Code snippets

info About author

comment Comments (0)

comment Add comment

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

No comments yet.

Dark theme mode

Dark theme mode is available on Kontext.

Learn more arrow_forward

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.


Learn more arrow_forward