lotus-noteslotus-formula

lotus notes formula language date range


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.


Solution

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