Is there is block to get the current time in a user defined format ?
You can get the time with now-block and then create these strings Date-String but your not completely free in the format.
But when you look at the code, it generates the following for you
(zdt.now()).format(dtf.ofPattern(âyyyy-MM-ddâ));
So what you could do is use the inline-script-block and manually create that little snippet youself with the wanted pattern.
Does that help?
Thanks, I couldnât figure that out as well and went with hour and minutes of ⊠but this gives you a number. So this would be 7:3 if itâs 07:03 which needs more formatting.
(zdt.now()).format(dtf.ofPattern(âHH:mmâ));
works. Thanks again.
Works pefectly. Only issue is size of inline box. This is far to small. So it is very hard ti edit the text.
I know but I havenât found any way to (re)size the box in the past where I have seen the same, though I tried just now with the latest blockly version on 3.4.x:
Does it look different on your side. Can you show meyour block with some blocks around, so I can try to reproduce it?
Maybe Iâll add something like âwith Patternâ (and input box) to that Block in 4.0
Would you like that?
Definitely! That would be perfect.
Is this the same topic?
Here is the PR for the new block which will be available in 4.0 M3