CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    How to Get Current Date and Time in VB6

    I searched the net and could not find how to do it. I imgine it must be simple using some class but can not find. I knwo how to do it in VB.NET but can not find in VB6

    Please help

    Thanks

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: How to Get Current Date and Time in VB6

    Code:
    Debug.Print Now()
    As simple as that..

  3. #3
    Join Date
    Jun 2005
    Posts
    4

    Lightbulb Re: How to Get Current Date and Time in VB6

    you can use format function to display the date and time of your own formatting

    dd - day
    mm = month mmm - monthname
    yyyy -- year 4 digit yy- 2 digit

    hh=hour and so on

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