#1 2016-10-10 17:06:41

Registered: 2016-10-07
Posts: 4

Properly usage of the DateGet and DateSet actions

hello David

what goes wrong with this code, because result isn't correct

NewDate "" "" "[CurrDate]"

DateGet "[CurrDate]" "year" "[SelectedYear]"

DateGet "[CurrDate]" "month" "[SelectedMonth]"

DateGet "[CurrDate]" "day" "[SelectedDay]"

AlertBox "[CurrDate] != [SelectedDay]/[SelectedMonth]/[SelectedDay]" "primary"


Last edited by andy (2016-10-10 17:07:33)


#2 2016-10-10 17:11:47

From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660

Re: Properly usage of the DateGet and DateSet actions

Hello andy,

Yes; In fact the DateGet and DateSet actions have a couple of mistakes in their help references. Basically we must use "date" instead "day" and expect (or set) the month in a range from 0 to 11. This is now refered in the actions' helps in order to avoid your problem. So the code that works as you expected is like the below one:

NewDate "" "" "[CurrDate]"

DateGet "[CurrDate]" "year" "[SelectedYear]"

DateGet "[CurrDate]" "month" "[SelectedMonth]"

Math "[SelectedMonth] + 1" "[SelectedMonth]"

DateGet "[CurrDate]" "date" "[SelectedDay]"

AlertBox "[CurrDate] = [SelectedYear]/[SelectedMonth]/[SelectedDay]" "primary"

App Builder is now updated in order to fix the refered actions' help in addition to other changes, fixes and enhancements. Thanks again for the report andy.


Board footer

Powered by FluxBB

Copyright ©2018 DecSoft. All rights reserved.