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

Posted on 2006-04-06
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?
Question by:peterdevadoss
    LVL 44

    Expert Comment

    Hello peterdevadoss,

    this works for me

            Dim mydate = New DateTime(2006, 1, 1)

    so what is you error?

    LVL 10

    Accepted Solution


    Try to put 'AS Datetime'

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

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now