Hi Mit,
I just used the VB6 Code Snippet Upgrade Tool in Visual Studio.Net
(Tools/Upgrade Visual Basic 6 Code Menu) to upgrade this VB 6 code and the
upgraded code is:
System.DateTime.FromOADate(73991 - 36161)
Hope that helps.
--
John Hart, Microsoft VB Team
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
[quoted text, click to view] > Content-Class: urn:content-classes:message
> From: "Mit" <mmelekhovets@firstair.ca>
> Sender: "Mit" <mmelekhovets@firstair.ca>
> Subject: Problem with CDATE() in .NET
> Date: Thu, 25 Sep 2003 07:24:43 -0700
> Lines: 11
> Message-ID: <1094801c38370$c33a4ea0$a601280a@phx.gbl>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> Thread-Index: AcODcMM4FiKlUe6RQpKBvZr9jlhiNQ==
> Newsgroups: microsoft.public.dotnet.languages.vb.upgrade
> Path: cpmsftngxa06.phx.gbl
> Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vb.upgrade:5350
> NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
> X-Tomcat-NG: microsoft.public.dotnet.languages.vb.upgrade
>
> I am doing conversion VB6 project to VB.NET
> in VB6:
> CDATE(73991-36161) result 7/28/2003
> in VB.NET
> CDATE(73991-36161) error: Value of type 'Integer' cannot
> converted to 'Date'
> What should I do in .Net to get same result?
>
>
>
>
>