Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Parsing date value .. is that changed in vs 2005 ??

Posted on 2006-04-06
2
Medium Priority
?
219 Views
Last Modified: 2010-04-23
My existing code in vs 2003 is as follows, which returns error in vs 2005:

 Dim myDate = New DateTime(2006,5,30)

This how I construct a date in vs 2003.  
How do i do this in vs 2005?
0
Comment
Question by:peterdevadoss
2 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 16389893
Hello peterdevadoss,

this works for me

        Dim mydate = New DateTime(2006, 1, 1)
        MessageBox.Show(mydate.ToString())

so what is you error?

bruintje
0
 
LVL 10

Accepted Solution

by:
ericwong27 earned 150 total points
ID: 16389914

Try to put 'AS Datetime'

Dim myDate As DateTime = New DateTime(2006, 5, 30)
MsgBox(myDate.ToLongDateString)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question