0
votes

In one of the databases I work on, it has a field which is a 'Time/Date List or Range'. The values stored are not a list so this can only be a Time/Date range. In fact, looking at one of the values in the document properties, it shows the value to be "25/11/2015 14:00:00 - 25/11/2015 15:00:00". For a list, I would normally extract entries with '@Subset(fieldName; 1)' but this does not work for the daterange type.

1
A Time/Date range is represented internally as a list (see www-12.lotus.com/ldd/doc/uafiles.nsf/…) so it surprises me somewhat that @Subset doesn't work, but I guess the special meaning is "helpfully" programmed into both the doc properties box and the subset function to hide that fact. - Richard Schwartz
Thanks Richard Schwartz, that's a great reference but I cannot find the note about Time/Date range being represented as a list (probably I've missed it). I am sure you're right so don't waste any time on it (and, fortunately, I've solved the problem anyway) - Paul
Forget this, just found it, page 67. "TimeRange A list of dates and times" - Paul
I was going to put the page number in there for you, but I forgot. - Richard Schwartz

1 Answers

1
votes

Very painful but.

For start date:-

@Date(@TextToTime(@Subset(@Explode(@Text(fieldName);"-");1)))

For start time:-

@Time(@TextToTime(@Subset(@Explode(@Text(fieldName);"-");1)))

For end date:-

@Date(@TextToTime(@Subset(@Explode(@Text(fieldName);"-");-1)))

For end time:-

@Time(@TextToTime(@Subset(@Explode(@Text(fieldName);"-");-1)))

Working now.