DateTime conversion

V

Vishal

Hi,

I am tryoing to convert the following string to a
date. Unfortuanly I get the error: "String was not
recognized as a valid DateTime."

This is my code:

CheckDate("2004-11-01T21:18Z")

private function CheckDate(ByVal strPostDate as string)

Dim dtDate As DateTime = Convert.ToDateTime
(strPostDate)
end function

Can somebody help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top