Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How would I go about converting a string to a date: I have this

 

Dim Dat as DateTime

Dat = Date.FromOADate(6/03/06)

 

but this always returns 8:00:00AM

how do I get it to return 6/03/06 as a date I am doing this because I want to be able to add one day onto this value, I also do not know how to do that. Any suggestions? Thanks

  • Leaders
Posted

My goodness, gracious, great balls of fire.

 

VB also has support for DataTime literals if that helps. Instead of quotes you can use number signs...

Dim TheThirtyFirstOfMayInNineteenNinetyThree As DateTime = [color=Red]#5/31/1993#[/color]

And just to point out...

Posts should be posted in the proper forum[/Quote]

A post like this, which really has nothing to do with ASP.NET should really go in the general section. Also, it would do you a lot of good to check the object browser, intellisense, MSDN, or do a quick google before posting here so that you don't find yourself answering your own questions this way on a public forum.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...