FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error of date conditional - Resolved
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Error of date conditional - Resolved
Posted: Fri May 03, 2019 08:17 PM

I have this conditional expression

//day
IF DTOS(dDataIniziale) = DTOS(oReservation:CHECK_IN) .and. DTOS(dDataFinale) = DTOS(oReservation:CHECK_OUT)
lday:=.t.
Endif

why it is wrong ?

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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error of date conditional
Posted: Sat May 04, 2019 03:01 PM
Nothing wrong with the syntax. Why do you say it is wrong?

Code (fw): Select all Collapse
DTOS(dDataIniziale) = DOS(oReservation:CHECK_IN) .and. DTOS(dDataFinale) = DTOS(oReservation:CHECK_OUT)

is equivalent to
Code (fw): Select all Collapse
dDataIniziale = oReservation:CHECK_IN .and. dDataFinale = oReservation:CHECK_OUT

This is simple, straight forward and faster to execute.
Don't make simple things complex.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Error of date conditional
Posted: Sat May 04, 2019 03:43 PM

I need it to check id the booking is for only one day , on the beach I put a image of a small yellow sun on umbrella

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