Forums > MaxMSP

a display problem in using object [date]

October 4, 2009 | 11:46 pm

Dear users,

Today is 5th ?October 2009.
I can get this information by using object [date].
It produces the date of today as the following:

However, I want to produce the following:

How can I reach my wish?


October 5, 2009 | 2:15 am

Max doesn’t like integers to have a zero in front of them. Thus, as an integer, 04 always gets converted to 4. The only way to do it, is to convert the integer to a symbol "04". Since both the months and the dates can have a zero in front of them, you need to be able to fix both. This example uses [combine] to make a symbol with a leading zero out of integers lower than 10, and then uses another combine to string them all together in the mmddyyyy format you want.

— Pasted Max Patch, click to expand. —
October 5, 2009 | 5:40 am


October 5, 2009 | 6:03 am

For an even simpler version, replace the [if] objects with [split 1 9]. Hook ’em up the same way.

October 5, 2009 | 6:27 am

It is amazing!


Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP