Error of date conditional - Resolved

Error of date conditional - Resolved

Postby Silvio.Falconi » Fri May 03, 2019 8: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 ?
Last edited by Silvio.Falconi on Sun May 05, 2019 8:40 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7054
Joined: Thu Oct 18, 2012 7:17 pm

Re: Error of date conditional

Postby nageswaragunupudi » Sat May 04, 2019 3:01 pm

Nothing wrong with the syntax. Why do you say it is wrong?

Code: Select all  Expand view

DTOS(dDataIniziale) = DOS(oReservation:CHECK_IN) .and. DTOS(dDataFinale) = DTOS(oReservation:CHECK_OUT)
 

is equivalent to
Code: Select all  Expand view

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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error of date conditional

Postby Silvio.Falconi » Sat May 04, 2019 3: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7054
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 92 guests