RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

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

RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

Reddy, Gopikrishna
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.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

ilangostl
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:
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.



--
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




--
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
Reply | Threaded
Open this post in threaded view
|

FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

Reddy, Gopikrishna
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:
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.



--
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


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.



--
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

message-footer.txt (352 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

ilango_g
Hi Gopi
First,are your dates of type as xs:date or xs:string?

It is possible to obtain the days by doing
op:subtract-dates($arg1 as xs:date, $arg2 as xs:date) as xs:dayTimeDuration

Example:
op:subtract-dates(xs:date("2000-10-30"), xs:date("1999-11-28")) returns an xs:dayTimeDuration value corresponding to 337 days.

ilango






--- On Sun, 4/20/08, Reddy, Gopikrishna <[hidden email]> wrote:
From: Reddy, Gopikrishna <[hidden email]>
Subject: [ops-users] FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT
To: [hidden email]
Cc: [hidden email]
Date: Sunday, April 20, 2008, 10:42 PM

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:
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.



--
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


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.

--
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


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
Reply | Threaded
Open this post in threaded view
|

FW: Re: FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

Reddy, Gopikrishna
 
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) &lt; (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) &lt; (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

Hi Gopi
First,are your dates of type as xs:date or xs:string?

It is possible to obtain the days by doing
op:subtract-dates($arg1 as xs:date, $arg2 as xs:date) as xs:dayTimeDuration

Example:
op:subtract-dates(xs:date("2000-10-30"), xs:date("1999-11-28")) returns an xs:dayTimeDuration value corresponding to 337 days.

ilango






--- On Sun, 4/20/08, Reddy, Gopikrishna <[hidden email]> wrote:
From: Reddy, Gopikrishna <[hidden email]>
Subject: [ops-users] FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT
To: [hidden email]
Cc: [hidden email]
Date: Sunday, April 20, 2008, 10:42 PM

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:
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.



--
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


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.

--
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


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.



--
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

message-footer.txt (352 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Re: FW: Re: RE:DAYS FROM DATE FIELD IN MM/DD/YYYY FORMAT

Alessandro Vernet
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