Time record

Time record

Postby Silvio » Sun Aug 24, 2008 4:49 pm

On a dialog I write :

Local oOra,aOra:= "00:00"

Code: Select all  Expand view  RUN

@ 38, 48 TMPicker oOra Var aOra OF oDlg SIZE 40, 12 PIXEL FONT oFont1 UPDATE
         oOra:nStyle := nOr( oOra:nStyle, 9 )




when it create the get ash the time as "00:00:00"

IF i insert 19:47:00

then it save the time with "194700"


then I use a conversion string but I have the error in time

transform(left( alltrim((oDTavoli)->Orario),5),"99:99")

it let me show the time as "19:70"

How I can make to save and show the real time format hh/mm

thanks
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Time-function

Postby ukoenig » Sun Aug 24, 2008 6:57 pm

Hello Silvio,

cTest1 := "194700"
cTest2 := Transform( cTest1, "@R 99/99/99")
msgalert( cTest2 )

"19:47:00"
------------
cTest2 := Transform( cTest1, "@R 99:99:99")

"19 - 47 - 00"
---------------
cTest2 := Transform( cTest1, "@R 99 - 99 - 99")

Returns < hour/minutes/seconds > as a string

Regards

Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby nageswaragunupudi » Mon Aug 25, 2008 12:39 am

Timepicker works correctly in FWH 8.08

1. Now it is not necessary to use "oOra:nStyle := nOr( oOra:nStyle, 9 )"
2. Result sting is now formatted as 'HH:MM:SS'. We need not format it ourselves.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests