FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Conversione Time
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Conversione Time
Posted: Fri Jun 13, 2014 08:26 AM

I must converte a Time string to Number

sample ctime:= "08:30" -------> 830

any suggestion ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Conversione Time
Posted: Fri Jun 13, 2014 08:38 AM
What about :
Code (fw): Select all Collapse
cTime := "08:30"
dTime := (VAL(LEFT(cTime,2)) * 100) + VAL(RIGHT(cTime,2))

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Conversione Time
Posted: Fri Jun 13, 2014 09:01 AM

thanks run ok

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion