VB - Time

hi does anyone know the code to show the continous time instead of the time of when the form loads?thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dim strdate as string
strdate = date()

if you want it in a textbox place this code

dim strdate as string

Private Sub Form_Load()
strdate = date
text1.text = strdate
End Sub

hope this is what you need

Greets Erik

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
to get the date

strDay = CStr(Day(Date))

to get the day (numerically)

strDay = CStr(Weekday(Date)))

to get teh day (name)

strDay = CStr(WeekdayName(Weekday(Date)))
Simplest way is to add a timer control to your project
set the interval to 1000 to update every second

call datetime.now() from the timer event.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

did you change the text of this question or has EE screwed up ?  If you did change the text them pleae do not as you will have now asked and got answers fr two questions, not one.
i red it wrong

yes you can

place a timer on your form set the interval to 100 ( 10 updates a second )

double click on the timer then

and place a code like this

text1.text = time

thats all
I dont think you read it wrong WarLord I think he changed it after getting the first answer he wanted (free questions?).
This will give you the current time, and will update every second if you set the interval to 1000 on the timer control.

Private Sub Timer1_Timer()
Text1.Text = Format(Now, "hh:mm:ss AM/PM")
End Sub
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Moderator, my recommended disposition is:

    Accept WarLord's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.