By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

converting date string into datetime object

P: n/a
I have a date stored as a string in the format mm/dd/yyyy.
What is the easiest way to get this date converted to a datetime
object so i can include it in the datediff function.

also what is the method i should use to return a date string back from
the datatime object, possibly in a different format such as dd/mm/yyyy

glenn
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* gl**********@bt.com (Glenn M) scripsit:
I have a date stored as a string in the format mm/dd/yyyy.
What is the easiest way to get this date converted to a datetime
object so i can include it in the datediff function.
'DateTime.Parse'/'DateTime.ParseExact'.
also what is the method i should use to return a date string back from
the datatime object, possibly in a different format such as dd/mm/yyyy


'DateTime.ToString'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.