Reply To: Date Format

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Date Format Reply To: Date Format

#58705
Charlie Bursell
Participant

    set olddate 20040517123045

    # Make it scanable – put a space between date and time

    # if the field has more than date

    if {[string length $olddate] > 8} {

          regsub — {^d{8}} $olddate {& } olddate

    }

    set newdate [clock format [clock scan $olddate] -format

         “%B-%d-%Y %T”]

    echo $newdate

    => May-17-2004 12:30:45