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

String to Date in VB.Net?

P: n/a
CG
Hi,

This seems simple but I don't know what I am doing wrong.

I have a string as "15122004"

I want to convert this to a date.

I have Option Strict On.

How can I convert this string to a date in format ("dd/mm/yyyy") without
turning off Option Strict?

Thanks.
Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Try DateTime.ParseExact().

Eg: DateTime.ParseExact ("15122004", "ddMMyyyy", Nothing)

"CG" <CG@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Hi,

This seems simple but I don't know what I am doing wrong.

I have a string as "15122004"

I want to convert this to a date.

I have Option Strict On.

How can I convert this string to a date in format ("dd/mm/yyyy") without
turning off Option Strict?

Thanks.
Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.