Linked Questions

1 vote
7 answers
38k views

How can I convert a textbox string to datetime in asp.net c# ? I tried this: DateTime d2 = Convert.ToDateTime(tbx_Created.Text); string createdformatted = d2.ToString("MM/dd/yyyy hh:mm:ss tt"); ...
Abdu's user avatar
  • 225
-1 votes
1 answer
9k views

I am trying to read date from excel using code String ss = (String)w.Cells[2 + i, 4].Value2; dRow[3] = DateTime.Parse(ss); Code works when ss = "12/11/2015" but gives error String was not ...
Hot Cool Stud's user avatar
0 votes
3 answers
2k views

I want to check if a string is in yyyyMMddHHmmss format in C#. What is the best way to do it. Here I have tried with DateTime.TryParse, but it always return false. string currentFileName = "...
SUBHAJIT GANGULI's user avatar
-1 votes
1 answer
3k views

So i'm trying to validate date in format DDMMYYYY. string date = "12031996"; i want to be able to validate if what user entered is in this specific format. And also want to be able to check if the ...
Shrey's user avatar
  • 103
-3 votes
4 answers
5k views

I have one date in string "18/07/2013 04:25:28 PM".How to convert this string to DateTime in c#.When I am trying to convert it into Date time I am getting an error "Input String is not in correct ...
Nimmi's user avatar
  • 690
-7 votes
2 answers
2k views

This code is a simplified version of what I'm trying to do: this.dateValue = "8/12/2005"; return DateTime.dateValue.DayOfWeek.ToString(); I want to use my dateValue in stead of 'NOW'
Awa's user avatar
  • 160
-1 votes
2 answers
1k views

How to get DateTime from string: (I don't know what format it is) Wed Jan 08 2014 00:00:00 GMT+0100 (Central Europe Standard Time) To DateTime?
Milos's user avatar
  • 677
1 vote
3 answers
237 views

In the above code, I am getting the date data from SpreadsheetDocument. The exampled date cannot be converted. But other dates can be converted. Why cant i convert this date and how can I convert it ...
user3744110's user avatar
-3 votes
1 answer
646 views

I have 3 separate strings with the following format: 01-29-2016: a date, picked from a bootstrap datepicker 1:00am start time, picked from a dropdown, format could also be e.g. 10:00pm 2:30am end ...
alex's user avatar
  • 1,350
-3 votes
2 answers
2k views

I have a string and I want to convert it from string to datetime. When I'm trying its giving exception. Please suggest me how to do. string stime = "2014-02-02T24:00:00"; DateTime dtStartDateTime = ...
user3264676's user avatar
-9 votes
2 answers
3k views

I have a MySQL DateTime column that I need to query using C#. The problem is that when I try to query the column with the DateTime format of 'dd-MM-yyyy' it doesn't bring back any data but it does ...
Andrew Kilburn's user avatar
0 votes
3 answers
334 views

Possible Duplicate: Parse string to DateTime in C# I am getting date and time returned from an API as a string in the following format: Mon Aug 13 15:04:51 -0400 2012 Does anyone have experience ...
Thomas's user avatar
  • 6,008
-3 votes
1 answer
233 views

I have a string and I have to convert it into DateTime type. '11 Jun 2015 (12:10)' I have to parse it into DateTime. I have used DateTime.Parse("MyDateString") but it is throwing an exception. ...
Farrukh Ahmed's user avatar
-3 votes
2 answers
868 views

I am trying to convert different string date formats to a specific format i.e., YYYYMMDD and all the incoming dates are valid. How can I return a new list of strings representing this format
Mithun Kumar's user avatar
0 votes
1 answer
401 views

Needing expert advice for date format issue . I have a string value strDate= "03/04/2018" which is dd/mm/yyyy . I am trying to convert into format dd mmm yyyy . If I use (Convert.ToDateTime(strDate))....
Suzane's user avatar
  • 203

15 30 50 per page
1
2 3 4 5