Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Mysql-protocol Date issue

From: amicom:sonic at: 14-Aug-2003 19:27

Tim, Here's a couple of functions I use for precisely that purpose: pad: func [str len /local tmp][ if not string? str [str: form str] tmp: copy "" insert/dup tmp "0" len change/part tmp head reverse str length? str head reverse tmp ] mysql-date: func [date /local out][ if error? try [ if string? date [date: to-date date] out: rejoin [date/year "-" pad date/month 2 "-" pad date/day 2] ][out: copy ""] out ] Bohdan "Bo" Lechnowsky Lechnowsky Technical Consulting At 04:41 PM 8/14/03 -0800, you wrote: