|
-
Aug 18th, 2005, 02:23 PM
#1
Thread Starter
Junior Member
[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.
-
Aug 18th, 2005, 02:26 PM
#2
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"
-
Aug 18th, 2005, 02:27 PM
#3
Thread Starter
Junior Member
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?
-
Aug 18th, 2005, 02:28 PM
#4
Re: Help with Date in VB6
 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:
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."
-
Aug 18th, 2005, 02:28 PM
#5
Fanatic Member
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.
-
Aug 18th, 2005, 02:29 PM
#6
Thread Starter
Junior Member
Re: Help with Date in VB6
Great, thankyou a lot guys.
-
Aug 18th, 2005, 02:29 PM
#7
Lively Member
Re: Help with Date in VB6
Hi
Code:
text1.text = Format(Now, "dddddd")
would load the current date into the text box text1.
-
Aug 18th, 2005, 02:32 PM
#8
Re: Help with Date in VB6
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|