Thanks Roman,

Here is a working example for archive.
n

Le 18/03/2021 à 10:29, Roman Haefeli a écrit :
On Thu, 2021-03-18 at 09:57 +0100, Nicolas Montgermont wrote:

I was wondering what is the best (as in easiest/cleaner/vaniller) way
to
produce a filename with formatted date inside these days.
producing that kind of message with a bang:
YYYYMMDD-HHMMSS

I don't think there is a vanilla way to get date and time. Zexy comes
with [date] and [time]. You could use [makefilename %02d] to create
zero-padded symbols from the different outlets and use a message box to
glue the whole string together:

[symbol $1$2$3-$4$5$6(

Roman

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list
#N canvas 253 262 744 382 12;
#X declare -lib zexy;
#X obj 133 82 t b b;
#X obj 133 133 date -----;
#X obj 218 133 time ----;
#X obj 133 344 print;
#X obj 146 160 makefilename %02d;
#X obj 159 187 makefilename %02d;
#X obj 197 211 makefilename %02d;
#X obj 210 238 makefilename %02d;
#X obj 224 265 makefilename %02d;
#X obj 133 292 pack f s s s s s;
#X msg 133 316 \$1\$2\$3-\$4\$5\$6;
#X obj 134 48 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 255 43 declare -lib zexy;
#X connect 0 0 1 0;
#X connect 0 1 2 0;
#X connect 1 0 9 0;
#X connect 1 1 4 0;
#X connect 1 2 5 0;
#X connect 2 0 6 0;
#X connect 2 1 7 0;
#X connect 2 2 8 0;
#X connect 4 0 9 1;
#X connect 5 0 9 2;
#X connect 6 0 9 3;
#X connect 7 0 9 4;
#X connect 8 0 9 5;
#X connect 9 0 10 0;
#X connect 10 0 3 0;
#X connect 11 0 0 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to