Date and Time Formatting
Date and Time Formatting
- Subject: Date and Time Formatting
- From: Andrew Wylie <email@hidden>
- Date: Fri, 02 Mar 2001 00:09:22 +1300
Emmanuel wrote:
>
At 13:01 -0600 27/02/01, g3pb wrote:
>
>
>
> this will remove the seconds from the current date
>
>
>
> set now to characters 1 thru -4 of ((current date) as string) as text
to which Emmanuel replied
>
Cool solution, yet, keep in mind that this is not a universal solution
>
since it depends on the particular settings of the "Time & Date" control
>
panel.
Is using components a universal solution?
-----------------------
set cd to (current date)
set wd to weekday of cd as string
set wd to text 1 thru 3 of wd
set dom to day of cd
set m to month of cd as string
set m to text 1 thru 3 of m
set t to time string of cd
set t to text 1 thru 5 of t & text -3 thru -1 of t
set x to space
set pert to wd & x & dom & x & m & x & t
-- "Thu 1 Mar 7:20 PM"
-----------------------
--still seems like alot of fuss--Andy
----------------------------------------------------------------------------
"space is a myth perpetrated by the makers of time"
----------------------------------------------------------------------------