CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: vb to c# help

  1. #1
    Join Date
    May 2002
    Posts
    121

    vb to c# help

    I need to convert the date into a long type.

    Here's the vb equivalent:
    Code:
    lngDate = CLng( CDate( "01/14/2002" )
    The reason why I need to do it is I need to convert the c# DateTime value into a smalltalk serial date (long, or int in .net)

    I greatly appreciate your help.

  2. #2
    Join Date
    Jul 2001
    Location
    Romania
    Posts
    52

    re:

    try with "TimeSpan"
    in DateTime class you can get the year, month, day, hour, minute, second.
    with thoose you can build a timespan (which is a long)
    It is the weak who are cruel,
    only the strong can be truly gentle!
    Szilard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured