Results 1 to 8 of 8

Thread: [Resolved] Help with Date in VB6 [Resolved]

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    17

    [Resolved] Help with Date in VB6 [Resolved]

    Hello is there any way to get the data that is set on your computer in the task bar into your application say a label/text box? If so could someone post the code.

    Thanks a bunch.
    Last edited by koolzap351; Aug 18th, 2005 at 02:39 PM.

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Help with Date in VB6

    Date will get you date
    Time ... well.. gets the time
    and Now gets it all!

    Example: Label1.caption = Date
    or Label1.caption = Time
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    17

    Re: Help with Date in VB6

    Great thanks, is there any way to change the format such as today would be August 18 with out the year?

  4. #4
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Help with Date in VB6

    Quote Originally Posted by koolzap351
    Great thanks, is there any way to change the format such as today would be August 18 with out the year?

    Yes:

    VB Code:
    1. Label1.caption = Format(Date,"mmmm d")
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  5. #5
    Fanatic Member
    Join Date
    Jan 2005
    Location
    In front of this pc.
    Posts
    580

    Re: Help with Date in VB6

    If you want the complete date and time you can call "Now" - if you just want the date you can call "Date" and for the time call "Time". You can also format them in multiple ways. This site has pretty good coverage of all the date functions.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    17

    Re: Help with Date in VB6

    Great, thankyou a lot guys.

  7. #7
    Lively Member putta's Avatar
    Join Date
    Oct 2004
    Location
    Original Citizen Of This Planet
    Posts
    86

    Re: Help with Date in VB6

    Hi

    Code:
    text1.text = Format(Now, "dddddd")
    would load the current date into the text box text1.

  8. #8
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Help with Date in VB6

    Quote Originally Posted by koolzap351
    Great, thankyou a lot guys.

    Don't forget to mark this thread resolved, and BTW welcome to the VB Fourms!
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


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