c# - Convert String to Date in .NET if my incoming date format is in YYYYMMDD -


What is the best way to convert from string to c # if my incoming date format YYYYMMDD

Ex: 20001106

date time Use ParseExact () Something like this:

  string date = "20100102"; Datetime DateTime = Datetime Purse Axact (date, "YYMMMD", culture info. Inventive culture);  

Comments

Popular posts from this blog

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

php - What is the best way to get the URL of a 404'd file after redirect? -