Finding Saturday by using FormatDateTime

5
I would like to find filter Saturdays and Sundays in my microflow. To start with finding Saturday, I used the following expression: formatDateTime($Date,'E') = 'Sat' The following action was executed: 2010-01-04 15:13:41.907 INFO - MICROFLOWENGINE: Executing action 'Gateway' [ Input constants: parameterMapping: {} ruleExpression: formatDateTime($Date,'E') = 'Sat' exclusiveSplitType: EXPRESSION subMicroflowName: Input variable: Date: Sat Jan 09 00:00:00 CET 2010 ] 2010-01-04 15:13:46.298 INFO - MICROFLOWENGINE: Action 'Gateway' has been executed [ Output value: $gatewayOutput: false ] Why does not work the microflow expression? Edit based on the comments: Since the expression depends on the selected language of the current user, how should I define my expression that it can be triggered by Dutch users as well as English users?
asked
2 answers
4

The return value of the expression EEE is language dependant. For only the english language this works fine. But when you use another language such as dutch you can use something like the following expression:

 formatDateTime( $Date, 'EEE') = 'Sat' or
 formatDateTime( $Date, 'EEE') = 'Za'
answered
4

You need to use:

formatDateTime($Date,'EEE') = 'Sat'

i.e. you need three E's to get a three letter representation of a day.

Edit based on the comments: the returned representation of a day is based on your language settings. You can detect what value is returned by this function by putting it in a showMessage activity. It doesn't matter if you use 'EEE' or 'E'. Both expressions result in 'Sat' when your language settings are English.

answered