probleum in date datatype format in vb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • veer
    New Member
    • Jul 2007
    • 198

    probleum in date datatype format in vb

    Hi
    i made a programe in which i want to calculate the total time from a column
    but when i declare a variable having datatype is "date" then the default value in this variable is "12:00:00:
    and when the calculation is less than 1 hour just like 38 minutes 56 sec
    it creates the probleum and shows like 12:38:56
    i searched on net but im not getting a proper idea
    can you give me some idea so that this 12 should be replaced in to "00"

    please help me
    varinder
  • kuzen
    New Member
    • Dec 2006
    • 20

    #2
    I didn't quite get your problem, show your code

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      What is the code you have used for calculation...?
      I Guess, you want to find the time elapsed (From your previous thread)

      Create a FormLevel variable say Dim MyTime As Date
      in Formload:
      MyTime = Now

      To find the time elapsed:
      Label1.Caption = Format(Now - MyDate, "hh:mm:ss")

      Regards
      Veena

      Comment

      Working...