construct a date

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

construct a date

alessiovaralta
Hi, I have to make a control on a date field. I have to take the date of the field and check if the date is greater than another date that I have to generate. My problem is to generate this date I try

date(year-from-date(current-date()),01,02) but I have an error..

How can I generate the date for the comparison
Reply | Threaded
Open this post in threaded view
|

Re: construct a date

Alessandro  Vernet
Administrator
Hi Alessio,

I haven't understood your use case, but based on your code alone, the following might work. Does this help?

xs:date(concat(year-from-date(current-date()), '-01-02'))

Alex

On Tue, Feb 7, 2017 at 1:00 AM, alessiovaralta <[hidden email]> wrote:
Hi, I have to make a control on a date field. I have to take the date of the
field and check if the date is greater than another date that I have to
generate. My problem is to generate this date I try

date(year-from-date(current-date()),01,02) but I have an error..

How can I generate the date for the comparison

--
View this message in context: http://discuss.orbeon.com/construct-a-date-tp4662198.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet