CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2000
    Posts
    58

    Date - Help!!!!!!!!

    Hi,

    Does anyone have some code that converts a date\time datatype into a double datatype.

    eg. convert 9:45pm into 21.75

    Please help as is urgent.

    Thanks.


  2. #2
    Join Date
    Jan 2000
    Location
    Saskatchewan, Canada
    Posts
    595

    Re: Date - Help!!!!!!!!

    Text1 = CDbl(Time) * 24


    David Paulson


  3. #3
    Join Date
    Sep 2000
    Posts
    58

    Re: Date - Help!!!!!!!!

    That works great. However, there is one more problem. The time is coming from a date/time field and therefore I need to first split the time away from the date.

    DO YOU KNOW HOW TO DO THIS?

    THANKS HEAPS.


  4. #4
    Join Date
    Jan 2000
    Location
    Saskatchewan, Canada
    Posts
    595

    Re: Date - Help!!!!!!!!

    debug.Print formatdatetime(now,vbShortTime)

    David Paulson


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