Results 1 to 6 of 6

Thread: Time & Date [solved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Utah
    Posts
    397

    Time & Date [solved]

    I have a problem im trying to get the Date and Time to be displayed on labels so i have:
    VB Code:
    1. label1.caption = Date
    which works and perfectly displays the Date

    but...

    VB Code:
    1. label2.Caption = Time
    doesn't work, but it should, all that is displayed on label2 is "True"

    why doesn't Time work while Date works? what am i doing wrong?
    Last edited by Narfy; Dec 20th, 2003 at 01:49 AM.

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    Use this

    VB Code:
    1. Label2.Caption = (Time)

  3. #3
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089
    Shdnt happen that way.

    Perphaps u have a variable named "Time" and declared as boolean

    just check.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Utah
    Posts
    397
    hmmm it still does the same thing...

    but how about this
    VB Code:
    1. Format(Now, "hh:nn AMPM")

    I think they do the same thing... which is better the one above or Time?

  5. #5
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    read this:
    Originally posted by veryjonny
    Shdnt happen that way.

    Perphaps u have a variable named "Time" and declared as boolean

    just check.
    but you could still use

    vba.Time
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Utah
    Posts
    397
    ahhh, thanks, it turns out i had a control on my form named Time

    everything works perfect now.

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