Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New keyword DATEDIFF #170

Closed
rodrigorodriguez opened this issue Aug 12, 2021 · 3 comments
Closed

New keyword DATEDIFF #170

rodrigorodriguez opened this issue Aug 12, 2021 · 3 comments
Labels
3.0 bug Something isn't working review

Comments

@rodrigorodriguez
Copy link
Collaborator

days = DATEDIFF date1, date2, "days"

@rodrigorodriguez
Copy link
Collaborator Author

Added DATEADD as well.

@PH-Nascimento
Copy link
Contributor

@rodrigorodriguez não funcionou com a sintaxe informada:
log:
2022-01-10T23:32:41.333Z [GeneralBots] �[31merror�[39m: ERROR: INVALID BASIC CODE: Unexpected token 'this' evalmachine.:1async function await this.dateDiff(step) {^^^^
SyntaxError: Unexpected token 'this'at new Script (vm.js:100:7)at createScript (vm.js:261:10)at Object.runInContext (vm.js:292:10)at Function.callVM (D:\home\site\wwwroot\dist\packages\basic.gblib\services\GBVMService.js:719:16)
at runMicrotasks ()at processTicksAndRejections (internal/process/task_queues.js:93:5)at async GBMinService.processMessageActivity (D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:817:17)at async D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:705:21 Error: INVALID BASIC CODE: Unexpected token 'this' evalmachine.:1async function await this.dateDiff(step) {^^^^
SyntaxError: Unexpected token 'this'at new Script (vm.js:100:7)at createScript (vm.js:261:10)at Object.runInContext (vm.js:292:10)at Function.callVM (D:\home\site\wwwroot\dist\packages\basic.gblib\services\GBVMService.js:719:16)at runMicrotasks ()at processTicksAndRejections (internal/process/task_queues.js:93:5)at async GBMinService.processMessageActivity (D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:817:17)at async D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:705:21at Function.callVM (D:\home\site\wwwroot\dist\packages\basic.gblib\services\GBVMService.js:722:19)at runMicrotasks ()at processTicksAndRejections (internal/process/task_queues.js:93:5)at async GBMinService.processMessageActivity (D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:817:17)at async D:\home\site\wwwroot\dist\packages\core.gbapp\services\GBMinService.js:705:21
2022-01-10T23:32:41.346Z [GeneralBots] �[32minfo�[39m: Translated text(sendText): Lamento, ocorreu um erro que já foi registrado para ser tratado..
2022-01-10T23:32:42.382Z [GeneralBots] �[32minfo�[39m: Message [Lamento, ocorreu um erro que já foi registrado para ser tratado.] sent to 5521979047667: {"sent":true,"message":"Sent to 5521979047667@c.us","id":"true_5521979047667@c.us_3EB07B80A0A02176184E","queueNumber":4952}

@PH-Nascimento
Copy link
Contributor

talk “informe a data 1”

hear data1

talk “informe a data 2”

hear data2

dias = DATEDIFF data1, data2, "dias"

talk “ a diferença de dias é: “ + dias

exit

@PH-Nascimento PH-Nascimento added bug Something isn't working and removed pending test labels Jan 10, 2022
@rodrigorodriguez rodrigorodriguez self-assigned this Mar 2, 2023
@rodrigorodriguez rodrigorodriguez removed their assignment Mar 6, 2023
rodrigorodriguez pushed a commit that referenced this issue Jul 9, 2023
# [2.4.0](2.3.9...2.4.0) (2023-07-09)

### Bug Fixes

* **all:** CWD in Windows now working. ([6721c3d](6721c3d))
* **all:** Fixes in production. ([56b6877](56b6877))
* **all:** HTTP handler added. ([7c6a175](7c6a175))
* **all:** Minor changes in PROD. ([f69b3f0](f69b3f0))
* **all:** Minor changes in PROD. ([0b5fa3e](0b5fa3e))
* **all:** Minor changes in PROD. ([904691c](904691c))
* **all:** Minor changes in PROD. ([d7a5ef5](d7a5ef5))
* **all:** Minor changes in PROD. ([892025e](892025e))
* **all:** Minor changes in PROD. ([76df151](76df151))
* **all:** Minor changes in PROD. ([f20b5f6](f20b5f6))
* **all:** Minor changes in PROD. ([a60581b](a60581b))
* **app.ts:** Preparing to use 4 or more SSL certificates. ([72b645f](72b645f))
* **azuredeployer.gbapp:** Adding Resource Providers (.Web/.Sql) ([6c9d124](6c9d124))
* **azuredeployer.gbapp:** Create DB with basic cost. ([0ed600e](0ed600e))
* **azuredeployer.gblib:**  FREE flag for database. ([1074ef7](1074ef7))
* **basic.gblib:**   [#196](#196) Spellchecker in groups now working. ([45ad0c3](45ad0c3))
* **basic.gblib:**   [#269](#269) Fixing of group autostart behaviour. ([de77227](de77227))
* **basic.gblib:**   [#286](#286) fix token replaacement. ([a679786](a679786))
* **basic.gblib:**   [#286](#286) fix token replaacement. ([0e9c2e9](0e9c2e9))
* **basic.gblib:**   Debugger improvements. ([3e68858](3e68858))
* **basic.gblib:**  Fixes in WebAutomation. ([d4cf165](d4cf165))
* **basic.gblib:**  Fixes in WebAutomation. ([b576b6f](b576b6f))
* **basic.gblib:**  Fixes in WebAutomation. ([d1b9da2](d1b9da2))
* **basic.gblib:**  GBAI automatic retrieval. ([0ef0fc0](0ef0fc0))
* **basic.gblib:**  GBAI automatic retrieval. ([04e69b9](04e69b9))
* **basic.gblib:**  GBAI automatic retrieval. ([6992bf0](6992bf0))
* **basic.gblib:** [#170](#170)  Fixing DATEDIFF. ([4314a37](4314a37))
* **basic.gblib:** [#226](#226) testing. ([97df425](97df425))
* **basic.gblib:** [#226](#226) testing. ([4c037a7](4c037a7))
* **basic.gblib:** [#227](#227) - HEAR AS FILE and GET/SET PARAM. ([bc5c1b0](bc5c1b0))
* **basic.gblib:** [#227](#227) - HEAR AS FILE and GET/SET PARAM. ([2521117](2521117))
* **basic.gblib:** [#227](#227) - HEAR AS FILE and GET/SET PARAM. ([ceded7f](ceded7f))
* **basic.gblib:** [#227](#227) - HEAR AS FILE defining where to save, per bot. ([b64a42f](b64a42f))
* **basic.gblib:** [#227](#227) - HEAR AS FILE defining where to save, per bot. ([473cd98](473cd98))
* **basic.gblib:** [#227](#227) - HEAR AS FILE. ([c5290b9](c5290b9))
* **basic.gblib:** [#227](#227) - HEAR AS FILE. ([42dbba4](42dbba4))
* **basic.gblib:** [#282](#282) Fix SSR for Bots 3.0. ([866b361](866b361))
* **basic.gblib:** [#282](#282) Fix SSR for Bots 3.0. ([7f3bd7d](7f3bd7d))
* **basic.gblib:** [#307](#307) - Fixed user context in API. ([cbce44f](cbce44f))
* **basic.gblib:** [#307](#307) - Fixed user context in API. ([4496cef](4496cef))
* **basic.gblib:** Adjustment in package version. ([e66c481](e66c481))
* **basic.gblib:** Correct web automation 'date' use. ([4809fec](4809fec))
* **basic.gblib:** Correcting the position of Parentheses ([a925c8e](a925c8e))
* **basic.gblib:** FILL keyword can now template images and AS IMAGE can convert a DOCX to a PNG. ([41ceedf](41ceedf))
* **basic.gblib:** FILL keyword can now template images and AS IMAGE can convert a DOCX to a PNG. ([16bdab6](16bdab6))
* **basic.gblib:** fix dynamic parameter generation. ([11b0ea2](11b0ea2))
* **basic.gblib:** Fix getNow return. ([f288987](f288987))
* **basic.gblib:** Fix getNow return. ([5631ce9](5631ce9))
* **basic.gblib:** Fix getToday return. ([0e33c97](0e33c97))
* **basic.gblib:** Return the last information with getTextOf ([ececb0d](ececb0d))
* **basic.gblib:** Upgrade to https://github.com/vasyas/push-rpc from WS to HTTPS. ([5534b41](5534b41))
* **basic.gblib:** Upgrade to https://github.com/vasyas/push-rpc from WS to HTTPS. ([f3c756b](f3c756b))
* **basic.gblib:** Upgrade to https://github.com/vasyas/push-rpc. ([f3b7c1d](f3b7c1d))
* **basic.gblib:** WA page bug removal. ([d902e14](d902e14))
* **core.gbapp:** [#195](#195) bind call to provide min context for uploads. ([b12a462](b12a462))
* **core.gbapp:** [#195](#195) bind call to provide min context for uploads. ([b2f2c73](b2f2c73))
* **core.gbapp:** [#336](#336) timeout in API fixed. ([0c44361](0c44361))
* **core.gbapp:** [#336](#336) timeout in API fixed. ([eb6800e](eb6800e))
* **core.gbapp:** [#341](#341) fix regarding COPY files. ([a292b77](a292b77))
* **core.gbapp:** [#344](#344) fix regarding SET FILTER keyword. ([db7ed36](db7ed36))
* **core.gbapp:** /logs working again. ([d08e11f](d08e11f))
* **core.gbapp:** fixed the use of GBLogEx to create GuaribasLog. ([2cb866b](2cb866b))
* **core.gbapp:** Upload now saves the file in correct folder. ([e31cd4d](e31cd4d))
* **core.gblib:**  SSR fixing about botId. ([799715a](799715a))
* **default.gbui:** [#153](#153) fix. ([b6f6a50](b6f6a50))
* **default.gbui:** [#263](#263) Loads menu.xlsx as subject.json alternative. ([00434bd](00434bd))
* **default.gbui:** [#263](#263) Loads menu.xlsx as subject.json alternative. ([241596b](241596b))
* **dependencies:**  Whatsapp-web.js to "1.20.0". ([1857b51](1857b51))
* **gbapp\AskDialog:** Supress Echo Nothing_else ([4ee3012](4ee3012))
* **gbapp\AskDialog.ts:** Supress anything_else ([6d8feca](6d8feca))
* **kb.gbapp:** [#276](#276) use of NLP.js upgrade to v4. ([ec1c38f](ec1c38f))
* **kb.gbapp:** [#276](#276) use of NLP.js upgrade to v4. ([5c48d39](5c48d39))
* **kb.gbapp:** [#297](#297) Spellchecker fixed after MSFT changes in service. ([80853f0](80853f0))
* **kb.gbapp:** [#298](#298) search fix and params. ([78778da](78778da))
* **kb.gbapp:** [#332](#332) fix STS. ([01cf280](01cf280))
* **kb.gbapp:** /publish review, error handling improved and clean up. ([c94228c](c94228c))
* **kb.gbapp:** Dialog now are finished OK. ([a969abb](a969abb))
* **kb.gbapp:** Dialog now are finished OK. ([a7a1d47](a7a1d47))
* **kb.gbapp:** Download only if not in cache optimization. ([b30e016](b30e016))
* **security.gblib:** Params support in users. ([82a9ba9](82a9ba9))
* **whatsapp.gblib:** [#262](#262) wrong key value. ([565ad4a](565ad4a))
* **whatsapp.gblib:** [#288](#288) fix list and buttons. ([6f62453](6f62453))
* **whatsapp.gblib:** [#288](#288) unify puppteer params with GBSSR. ([b96a78e](b96a78e))
* **whatsapp.gblib:** [#309](#309) unify channel detection. ([cfe3ab3](cfe3ab3))
* **Whatsapp.gblib:** fix "whatsapp-web.js" compatibility issues. ([cd97189](cd97189))

### Features

* **whatsapp.gblib:** add 'graphapi' option. ([ce84053](ce84053))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 bug Something isn't working review
Projects
None yet
Development

No branches or pull requests

5 participants