Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > formating


Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2006, 01:57 AM
kevatt kevatt is offline
Newcomer
 
Join Date: Apr 2006
Location: essex
Posts: 11
Angry formating


as i have posted on all my threads I am new to vb

this must be the dumbest question ever asked

I am trying to format a text box to display the now time and date but i am not sure where to do the formating is it in the the control button code or is it that the text box that needs to have an event i have the language refrence books from vb4 where i find examlple code but cant seem to get this working

has vb6 code features moved on and the examples are not up to date

could sombody inform me of the route to take [COLOR=Blue]thanx as always[/COLOR]
__________________
know not alot but always willing to lean "if you dont ask you cant be toldwww.pcgp.org.uk
Reply With Quote
  #2  
Old 04-03-2006, 02:31 AM
anthony_n's Avatar
anthony_n anthony_n is offline
Senior Contributor
 
Join Date: May 2005
Location: Manchester,England
Posts: 1,293
Default

how do you want it formating. show us the code you have tryed to do and we will help you
__________________
ADO TUTOR

File IO Tutor
Reply With Quote
  #3  
Old 04-03-2006, 03:05 AM
kevatt kevatt is offline
Newcomer
 
Join Date: Apr 2006
Location: essex
Posts: 11
Default

'selection of booking times
sngsubpayable = Val(sngPerhour) * Val(sngnumhours)
'returns sub payable amount minus sign before fig
sngtotpayable = Val(sngdeposit) + Val(sngsubpayable)
'returns total payable amount
timetxt = mystr = Format(mytime, "h:m:s")
'The above line returns true in the timetxt box
__________________
know not alot but always willing to lean "if you dont ask you cant be toldwww.pcgp.org.uk
Reply With Quote
  #4  
Old 04-03-2006, 03:15 AM
DougT's Avatar
DougT DougT is offline
Ultimate Antique

Administrator
* Expert *
 
Join Date: Sep 2005
Location: Maldon,Essex, UK
Posts: 3,939
Default

Hi, fellow Essex Man,

To get today's date and current time use Now.
To format the Time use: timetext = Format(Now,"hh:mm:ss")

Regards
Doug
__________________
semel insanivimus omnes
S Data in context = Information, S Information in context = Knowledge, S Knowledge in context = Experience
S Experience in context = Wisdom= Data
Reply With Quote
  #5  
Old 04-03-2006, 04:57 AM
kevatt kevatt is offline
Newcomer
 
Join Date: Apr 2006
Location: essex
Posts: 11
Default

thats it u ree car

cheers "rochford"
__________________
know not alot but always willing to lean "if you dont ask you cant be toldwww.pcgp.org.uk
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->