Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Between 2 dates
Message
From
14/11/2023 03:06:55
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
To
14/11/2023 03:04:42
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01687236
Message ID:
01687239
Views:
39
Hi Luis.

>I have the following problem, because the command don´t return records between my 2 dates:
>lcSQLCmd = [SELECT * FROM DOCUMENTOS WHERE ( FECHA BETWEEN DATE(Year(FECHA), Month(FECHA), Day(FECHA)) and DATE(Year(date()), Month(date()), Day(date())) ) ;
> and tipodocu = 'F' And !DELETED() ORDER BY ID_ISO, FECHA, numdocu ASC ]

The problem here is that you are asking for all records where the FECHA date is between the FECHA date and today, which will always be true.
What date range are yop trying to use?

Ian Simcock.

Hi Ian

I need to extract range dates between 06.01.2024 and 14.11.2023.
I try to declare variables for Inicial date and last date, like:
m.IniDate
m.lastDate
But when I use theses variable inside lcSqlcmd error occur:
Invalid Column m.iniDate
Is that possible?

Thanks for your reply
Luis

Ian,
I mean range dates between : 06.01.2023 and 14.11.2023.
Thanks,
Luis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform