a display problem in using object [date]

Oct 4, 2009 at 11:46pm

a display problem in using object [date]

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:
1052009

However, I want to produce the following:
10052009

How can I reach my wish?

Best,
prko

#45726
Oct 5, 2009 at 2:15am

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. –
#164880
Oct 5, 2009 at 5:40am

thanks!

#164881
Oct 5, 2009 at 6:03am

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

#164882
Oct 5, 2009 at 6:27am

thanks!
It is amazing!

best,
prko

#164883

You must be logged in to reply to this topic.