@NishimuraChinatsu-9854 Thanks for reaching out. Can you share more details what you mean by I want to store data in formatdatetime divided into hours at 0:00 and 14:00 of the day. If you can share any example and what is the exception output then I can assist you.
Assuming you want the string in the format delta/excel/year=yyyy/mm=MM/day=dd/hour=hh
, where hh
will be either 00
or 14
, depending on the current hour in the Tokyo Standard Time
time zone the you can use the below expression
concat('delta/excel/year=',formatDateTime(convertFromUtc(addDays(utcNow(),-1),'Tokyo Standard Time'),'yyyy'),'/','month=',formatDateTime(convertFromUtc(addDays(utcNow(),-1),'Tokyo Standard Time'),'MM'),'/','day=',formatDateTime(convertFromUtc(addDays(utcNow(),-1),'Tokyo Standard Time'),'dd'),'/','hour=',if(equals(formatDateTime(convertFromUtc(utcNow(),'Tokyo Standard Time'),'HH'),'00'),'00','14'))
In the above expression hour value will be either 00 or 14 depending if it is 00 hr then the value will be 00 else 14. You can further change the expression inside the if condition as per your need such as greater, greaterorequals, less or lessthanequal. For more details on the usage please refer to Logical comparison function.
Feel free to get back to me if you need any assistance.