![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: can't understand this bug-can sdy help me see ? Topic Summary: Created On: 06/08/2021 04:36 PM Status: Post and Reply |
|
![]() |
![]() |
- dicdoc | - 06/08/2021 04:36 PM |
![]() |
![]() |
- PG LTU | - 06/08/2021 04:43 PM |
![]() |
![]() |
- speechpro | - 06/08/2021 09:20 PM |
![]() |
![]() |
- speechpro | - 06/08/2021 09:42 PM |
![]() |
|
I use a voice command to choose a date, yesterday's date, tomorrow, etc... and I want to get this date in a variaable in different formats : all variable are defined If ListVar1 = "aujourd'hui" Then DATEPAIEMENTLEFT = ""& Format (Now + 0, "yyyymmdd-") If ListVar1 = "d'aujourd'hui" Then DATEPAIEMENTLEFT = ""& Format (Now + 0, "yyyymmdd-") If ListVar1 = "demain" Then DATEPAIEMENTLEFT = ""& Format (Now + 1, "yyyymmdd-") If ListVar1 = "à demain" Then DATEPAIEMENTLEFT = ""& Format (Now + 1, "yyyymmdd-") If ListVar1 = "hier" Then DATEPAIEMENTLEFT = ""& Format (Now -1, "yyyymmdd-") If ListVar1 = "d'hier" Then DATEPAIEMENTLEFT = ""& Format (Now -1, "yyyymmdd-") If ListVar1 = "il y a 2 jours" Then DATEPAIEMENTLEFT = ""& Format (Now -2, "yyyymmdd-") If ListVar1 = "il y a 3 jours" Then DATEPAIEMENTLEFT = ""& Format (Now -3, "yyyymmdd-") If ListVar1 = "il y a 4 jours" Then DATEPAIEMENTLEFT = ""& Format (Now -4, "yyyymmdd-") msgbox(DATEPAIEMENTLEFT & " " & Format (Now + 0, "yyyymmdd-")) DATEPAIEMENTRIGHT = DATEPAIEMENTLEFT msgbox(""& Format (DATEPAIEMENTLEFT, "yy.mm.dd")) DATEPAIEMENTRIGHT = ""& Format (DATEPAIEMENTLEFT, "dd.mm.yyyy") === 1st messagebox work error freee 2nd message box gives "errir 10620 : invalid function argument value last line too === Why this error ? ------------------------- Memory: 16GB Microphone Brand and Model: LFH 4000 & Flexy Mike Operating System: win 10, latest update; Surface Book 2, Processor (CPU) Type & Speed: I7 8650 Soundcard Brand and Model: none Speech Software: Dragon Medical Practice Edition, french version: 4.2 Using KnowBrainer?:Yes |
|
|
|
![]() |
|
Double double quotes may be the problem. That turns into an escaped single open or close double quote character to use within a string (itself demarcated by double quotes). So why do you need it? Either put something in the string between the double quotes or exclude it (plus the "&" concatenation symbol since thee is nothing to concatenate anyway). -------------------------
|
|
|
|
![]() |
|
Double double quotes are not the problem (though not necessarily needed either). The variables as assigned are handled as type (string). Format() function varies based on expression type - strings can't be formatted with a date pattern. |
|
|
|
![]() |
|
*If you need two different date formats mixed as in your example (if not, tweak as needed) - I don't have advanced scripting open, so may not be 100% - give it a try... |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2023 FuseTalk™ Inc. All rights reserved.