Skip to Content

Passing the data interval to a text field

Hello, I want to send date in text format from 2 calendar objects into a date interval textfield e.g. "20090720:20090724".

How can I achieve this?

Thanks,

MD

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 24, 2009 at 04:04 AM

    Hi,

    In order to pass a date range in the text format you can use the following procedure.

    1. Let us say your calendar objects are "From" and "To".

    2. Create a data store and include a field "DateRange"(Text field), connect this data store to the output of your form and select event as submit.

    3. In the submit event write the formula suggested by Margaret Hilsbos or "DSTR(@from,"MM/DD/YYYY")&":"&DSTR(@to,"MM/DD/YYYY")" this is just another date format.

    4. now you can use the value in the data store(STORE@DateRange) to feed your data service, query etc... this will be a text value.

    hope this helps,

    Rk.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2009 at 08:09 PM

    Use a formula to concatenate the strings. Get the strings from each date with DSTR. For example,

    DSTR(@Date1,'YYYYMMDD')

    will return something like 20090731 for July 31, 2009.

    Concatenate with ampersand. So for example

    DSTR(@Date1,'YYYYMMDD') & ':' & DSTR(@Date2,'YYYYMMDD')

    should work.

    Hope this helps.

    ~ Margaret

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2009 at 08:29 AM

    Hi

    If you want to pass date interval as 'Text Format' then use following formula -

    CHR(Concatenated Date expression).

    Just put the fomula in the earlier reply in above bracket. That expression will be treated as 'Text'.

    Thanks & Regards

    Sandeep

    Add comment
    10|10000 characters needed characters exceeded