cancel
Showing results for 
Search instead for 
Did you mean: 

Passing the data interval to a text field

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

Former Member
0 Kudos

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

mh97
Contributor
0 Kudos

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