FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Time record
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Time record
Posted: Sun Aug 24, 2008 04:49 PM
On a dialog I write :

Local oOra,aOra:= "00:00"

 @ 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Time-function
Posted: Sun Aug 24, 2008 06: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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Time record
Posted: 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

Continue the discussion