This content has been marked as final. Show 11 replies
You can use the commands you listed and parse them manually, changing
all 01 month entries to "Jan" or whatever. That is a bit tedious
though. A much easier way is to use the BuddyAPI xtra. It has a command
called baSystemTime() which will let you format time and dates in pretty
much any way you want. BuddyAPI is free to use up to 2 functions- you
can get it at www.mods.com.au/budapi
Hi Mike, Thanks for your answer. Unfortnately I want to use it in a
shockwave movie for the web and Buddy API doesn't work on the web (as far as
I know). So, is the only other way to manually create your own index?
I haven't tried this, but I think that if you have MX2004, you can use
commands to do all sorts of parsing for you. There is a little write up
I found with some examples here (examples of JS- not their use in
Stu, take care. You will know that the date format changes between Mac and Windows, but it also varies as to how the date format is set in the control panel/properties. So if you are scripting it yourself ie: put item one of the date into item three of text fieldx, item one of the date in one person's setting may not be item one in someone else's settings. I ran into this a few months ago, however it was not a problem in the end as the machines on which the shockwave was to run had been locked by the IT crowd, so I knew what the default was to be.
Sorry if this causes difficulties, but better to know now ...
Have a look at the 'datelib' script at http://www.lingoworkshop.com/Codelib/xlib.php. This script emulates PHP's date formating in Lingo - for example:
d = the systemDate
put GetDateStr("jS of F Y, \a\\t g:i:s a", d)
-- "28th of February 2005, at 11:43:37 am"
> Have a look at the 'datelib' script at
> http://www.lingoworkshop.com/Codelib/xlib.php. This script emulates PHP's date
> formating in Lingo - for example:
> d = the systemDate
> put GetDateStr("jS of F Y, \a\\t g:i:s a", d)
> -- "28th of February 2005, at 11:43:37 am"
Thanks Luke. I tried teh script and got an error until I reliased the script had
to be named PhpDatelib.
> > put GetDateStr("jS of F Y, \a\\t g:i:s a", d)
> > -- "28th of February 2005, at 11:43:37 am"
What statement would show the day of the week as well?
l (lower case L) will show the day (full word like "thursday") and "D" will show a three letter version of the day. See
So for example,
put GetDateStr("l, jS of F Y")
-- "Thursday, 4th of January 2007"
Nice script you have there. Mind if I use it too?:) Well, have already tested it
out. I see you leftt out an abreviated month. You have the numereical value of
the month with and without a 0, but no 3 character month. Not too hard to add. I
added it but had to use a different letter to that specified in:
as you had used that letter already.
Director Lecturer / Consultant
Thanks for pointing that out - "M" should be "a short textual representation of a month, three letters" and "n" for numeric representation of a month, without leading zeros. I'll fix that in the morning.