Asking for a customer. Is there a way to get the number of a weekday in Flowscript? With the format function you can get weekdays based on a date as text, Monday,Tuesday etc. But is there a way to get 1,2,3 and so on, making it non locale dependent.
Hi,
Not sure about flow script but there is always the option to jump in to a sql connector and get it. E.g. datepart in mssql and something similar in PL.
What we are trying to get is next working day.
IFS has a funktion in PL, but we are switching to Odata and cannot find the endpoint for it.
So in this case I want to first âfilterâ away all weekends and then exeptions but in flow they are dependent on the users language setting. So if i use âyyyâ I get lör, sön or sat, sun etc and all other languages our users can have.
So what i would like is day in week like you get with PL âSELECT to_char(sysdate, âDâ) FROM dual;â
Hi,
when I use format(now(),âddddâ) in webclient I constantly keep getting Monday, Tuesday⊠no matter what the locale setings of the machine i am running the client on is, what the language in the browser is or the language /locale of the user running the flow.
So for me this works:
{case
when format(now(),âddddâ) = âMondayâ then 1
when format(now(),âddddâ) = âTuesdayâ then 2
when format(now(),âddddâ) = âWednesdayâ then 3
when format(now(),âddddâ) = âThursdayâ then 4
when format(now(),âddddâ) = âFridayâ then 5
when format(now(),âddddâ) = âSaturdayâ then 6
else 7
end}
When I run the same I right now get the Swedish name for Thursday so not really sure what it picks it up from.
I have a workaround for it and hat is to in a desition step check if saturday or sunday or lördag, or söndag etc etc.
So it works but would like to find a better solution for it where you donât have to âhopeâ you never get a new language
Hi,
yeah couldnt realy figure out what the language returned depends on, but i was happy its at least consistent and no amount of switching flow user languages or machines would break it for me
My best guess was that its the flow server locale that determines it (since on a German on prem server it says Donnerstag for any Flow user language/locale/browser language combo)