Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time () function. How to convert to 13:00 to 1:00
Message
From
28/10/2005 09:48:05
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/10/2005 09:32:24
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01062587
Message ID:
01062940
Views:
14
>the datetime() function refresehes my whole form and does not let me write correctly in the textbox, while im updating every second. But with the time() function, it does not have that problem. So I guess Ill stay with 24 hour clock, but thanks anyways :)

Here is a sample showing datetime() doesn't have such a capability (thanks God):
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  DataSession = 2

  Add Object cmdRefresh As CommandButton With Top=100,Caption='refresh'
  Add Object txtCustID As TextBox With ControlSource = 'customer.cust_id'
  Add Object txtCustID2 As TextBox With ;
    ControlSource = 'customer.cust_id', Left = 200
  Add Object txtTime As TextBox With ;
    top= 40,Enabled=.F.,DisabledForeColor=0,;
    value = Ttoc(Datetime(),2)
  Add Object myTimer As Timer With Interval=1000

  Procedure Load
    Use customer
    Set Hours To 12
    Set Seconds On
  Endproc

  Procedure myTimer.Timer
    Go Int(Rand()*Reccount('customer'))
    This.Parent.txtTime.Value=Ttoc(Datetime(),2)
    This.Parent.txtCustID2.Refresh
  Endproc
  Procedure cmdRefresh.Click
    Thisform.Refresh
  Endproc
Enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform