Easy to Create, Easy to Change - Easy to use!


Handling date in variable ...


Started by grohmann.papier@t-online.de
Search
You will need to Sign In to be able to add or comment on the forum!

Handling date in variable ...

Handling date in variable ...
How can I calculate date types in variables?
Because the problem is that, for example, SetVar ("vDate", GetValue ("Date") + 1) should
16:04:16 give, but is 15:04:17. How can I work around this problem if I want to add just 1 day?


Would be very grateful for any help.

Kind regards

Markus

Written by grohmann.papier@t-online.de 15/04/16 at 12:14:30 Dataease [{8}]FIVE

Re:Handling date in variable ...

Use ExecDQL.

execDQL("define /'vDate/' date. vdate=data-entry field1+1 .vdate := SetVar("vDate",vDate) .",Date)

this might be a little confusing but:

i re-use the temp variable vdate to run the function SetVar() the return value at this stage is not important so instead of defining retval or something like that to use for executing functions I re-use vDate.

temp var vDate and global var set by SetVar vDate is obviously not the same, but I use the same name simply because it is the same logically ;-)

This is to be honest of the "brilliance" of 8.x. You can combine functionality as you please so you can achieve exactly what you want.

Never thing that DQL is reserved for big reports/updates etc. DQL is just a language that you can exploit any way you like. 

Written by DataEase 17/04/16 at 17:23:42 Dataease [{8}]FIVE

Re:Re:Handling date in variable ...

Thanks for the quick response to my topic.
I will test the same time this solution.
Thanks again

Best regards
Markus

Written by grohmann.papier@t-online.de 17/04/16 at 20:01:43 Dataease [{8}]FIVE