
Quote from joferar333 on July 14, 2023, 2:30 pm@luishp buen dia por suerte despues de mucho penar todo el manejo de los datos en la base de tados funciona perfecto.
solo tengo un pequeño drama y seguramente debe ser un error de mi parte, tengo un campo que es fecha, que debe insertar el valor de la variable fecha
Yo la variable la defini asi .
Setvar [fecha] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
Pero cuando verifico en la base los datos insertados estan todos los campos menos fecha ahi me pone undefinet
Seguramente estoy definiendo mal la variable puede ser?
Mil gracias y buen fin de semana
Cordial saludo
ENGLISH
@roccocogliano
I have a field that is date, which should insert the value of the date variable
I defined the variable like this.
Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
But when I check the inserted data in the database, there are all the fields except the date, there it says undefinet
Surely I am defining the variable wrong maybe?
Thank you very much and have a good weekend
Best regard
@luishp buen dia por suerte despues de mucho penar todo el manejo de los datos en la base de tados funciona perfecto.
solo tengo un pequeño drama y seguramente debe ser un error de mi parte, tengo un campo que es fecha, que debe insertar el valor de la variable fecha
Yo la variable la defini asi .
Setvar [fecha] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
Pero cuando verifico en la base los datos insertados estan todos los campos menos fecha ahi me pone undefinet
Seguramente estoy definiendo mal la variable puede ser?
Mil gracias y buen fin de semana
Cordial saludo
ENGLISH
I have a field that is date, which should insert the value of the date variable
I defined the variable like this.
Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
But when I check the inserted data in the database, there are all the fields except the date, there it says undefinet
Surely I am defining the variable wrong maybe?
Thank you very much and have a good weekend
Best regard

Quote from roccocogliano on July 14, 2023, 2:43 pmHi @joferar333,
this line is wrong ---> Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
you are nesting the square brackets
try with this ---> setvar [date] "[NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]"
and don't forget the quotation marks otherwise you will get the division of the various numbers retrieved from the special variables
Hi @joferar333,
this line is wrong ---> Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
you are nesting the square brackets
try with this ---> setvar [date] "[NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]"
and don't forget the quotation marks otherwise you will get the division of the various numbers retrieved from the special variables

Quote from joferar333 on July 14, 2023, 2:57 pm@luishp,@roccocogliano, thanks
Yes now it does but look at how it inserts the date..
0.0009886307464162135
I have no idea how to make it take the content that I put into it...
@luishp,@roccocogliano, thanks
Yes now it does but look at how it inserts the date..
0.0009886307464162135
I have no idea how to make it take the content that I put into it...

Quote from roccocogliano on July 14, 2023, 3:00 pmdid you forget the quotation marks?
did you forget the quotation marks?

Quote from joferar333 on July 14, 2023, 3:08 pm@luishp, @roccocogliano You are right I had forgotten the quotes but even so having added them insert the data but wrong 0.0009886307464162135
@luishp, @roccocogliano You are right I had forgotten the quotes but even so having added them insert the data but wrong 0.0009886307464162135

Quote from roccocogliano on July 14, 2023, 3:12 pmthat number is just the division of day, month and year
can you share the application?
Otherwise I don't understand
that number is just the division of day, month and year
can you share the application?
Otherwise I don't understand

Quote from joferar333 on July 14, 2023, 3:42 pm@roccocogliano Put together a small example where the base is and the app must insert the current date in the date field...
@roccocogliano Put together a small example where the base is and the app must insert the current date in the date field...
Uploaded files:
Quote from roccocogliano on July 14, 2023, 4:50 pm@joferar333
Check out the attached working example which inserts the date correctly.
Your example didn't have the config.php, so I can't know how you had written the insert query.
Also in the 'added' routine you used a parameter named '[date]' but then you used a variable named '[data]' in the code.
In db 'test.db' you had only field 'fecha' and no other fields, not even a primary key.
Check out the attached working example which inserts the date correctly.
Your example didn't have the config.php, so I can't know how you had written the insert query.
Also in the 'added' routine you used a parameter named '[date]' but then you used a variable named '[data]' in the code.
In db 'test.db' you had only field 'fecha' and no other fields, not even a primary key.

Quote from roccocogliano on July 14, 2023, 4:56 pmI advise you to review all the examples (even videos, e.g. https://www.youtube.com/watch?v=u7IenKUhKAQ ) on databases.
They are very useful and well made.Greetings
Rocco
I advise you to review all the examples (even videos, e.g. https://www.youtube.com/watch?v=u7IenKUhKAQ ) on databases.
They are very useful and well made.
Greetings
Rocco

Quote from luishp on July 14, 2023, 6:34 pm@joferar, tienes problemas de sintaxis aquí:
Esto que has puesto está mal y ni siquiera se ejecutará (te sobran corchetes):
Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]Esto otro creará una variable numérica ejecutando la división matemática de las tres cifras que le das:
Setvar [date] [NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]Esto sería lo correcto ya que crea una variable de cadena de texto concatenando los tres números separados por una barra:
Setvar [date] "[NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]"Saludos.
@joferar, tienes problemas de sintaxis aquí:
Esto que has puesto está mal y ni siquiera se ejecutará (te sobran corchetes):
Setvar [date] [([NAB.DayNum]/[NAB.MonthNum]/[NAB.Year])]
Esto otro creará una variable numérica ejecutando la división matemática de las tres cifras que le das:
Setvar [date] [NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]
Esto sería lo correcto ya que crea una variable de cadena de texto concatenando los tres números separados por una barra:
Setvar [date] "[NAB.DayNum]/[NAB.MonthNum]/[NAB.Year]"
Saludos.