Hi ,
I Have a date field in MM/DD/YYYY FORMAT,Can
anybody tell me how to calculate days from this date field.
Thanks in advance,
K Gopikrishna Reddy
This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. |
Gopi
Could you be more specific? Are you saying: How can I calculate the no of days from this date, given the current date or something? ilango On Wed, Apr 16, 2008 at 8:45 AM, Reddy, Gopikrishna <[hidden email]> wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
Thanks for ur response my question
is:
I have two date fields which will be in
MM/DD/YYYY FORMAT i want to know how can i get the difference
between two dates in days
date1,date2 (I want date1-date2 in number
of days)
Plz do help me as this is very urgent to
me
Thanks in advance,
K Gopikrishna Reddy From: XGuy [mailto:[hidden email]] Sent: Sat 4/19/2008 7:23 PM To: [hidden email] Subject: [ops-users] Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT Gopi
Could you be more specific? Are you saying: How can I calculate the no of days from this date, given the current date or something? ilango On Wed, Apr 16, 2008 at 8:45 AM, Reddy, Gopikrishna
<[hidden email]>
wrote:
This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. |
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Thanks for ur reply Iam sending the code of my date fields ,Plz
tell me how to do this
dates of type as xs:string
<xforms:bind
nodeset="instance('main-instance')//giowndobdtdate1"
type="xs:string"
calculate=" replace( instance('main-instance')//giowndobdt, '(\d{2})(/)(\d{2})(/)(\d{4})', '$5-$1-$3' )" /> <xforms:bind nodeset="instance('main-instance')//giowndobdt" type="xs:string" constraint="if (.!='' and instance('main-instance')//status='1') then ( if (instance('main-instance')//giowndobdtdate1 castable as xs:date) then (xs:date(instance('main-instance')//giowndobdtdate1) < (current-date())) else false() ) else true()" /> <xforms:bind
nodeset="instance('main-instance')//giownownchgdtdate2"
type="xs:string"
calculate=" replace( instance('main-instance')//giownownchgdt, '(\d{2})(/)(\d{2})(/)(\d{4})', '$5-$1-$3' )" /> <xforms:bind nodeset="instance('main-instance')//giownownchgdt" type="xs:string" constraint="if (.!='' and instance('main-instance')//status='1') then ( if (instance('main-instance')//giownownchgdtdate2 castable as xs:date) then (xs:date(instance('main-instance')//giownownchgdtdate2) < (current-date())) else false() ) else true()" /> Thanks in advance ,
K Gopikrishna Reddy
From: ilango
[mailto:[hidden email]]
Sent: Mon 4/21/2008 8:45 PM To: [hidden email] Subject: [ops-users] Re: FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. |
Administrator
|
On Tue, Apr 22, 2008 at 12:00 AM, Reddy, Gopikrishna
<[hidden email]> wrote: > <xforms:bind nodeset="instance('main-instance')//giowndobdtdate1" > type="xs:string" > calculate=" > replace( > instance('main-instance')//giowndobdt, > '(\d{2})(/)(\d{2})(/)(\d{4})', > '$5-$1-$3' > )" /> One downside of using replace() in this way is that it will match the date only it is written as 04/23/2008. It won't work if one writes 4/23/2008 (i.e. 4 instead of 04). If you already have a constraint stating that dates have to be entered exactly in this format, then this is a good way to extract the different parts of the date. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |