Date and time

dunbarxx dunbarx at aol.com
Thu Jun 6 15:32:05 EDT 2019


OF course you would need a little better than the last, so the DOW is not
just entered by me for testing:

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime
   put dissectRawTime(rawTime)  into tSeconds
   convert rawTime to seconds
end mouseUp

function dissectRawTime rawtime
   get the long date ; convert it to dateItems
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put getMonth(item 2 of rawTime) into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & tDay into standardFormat
   convert standardFormat from dateItems to seconds
   answer standardFormat
end dissectRawTime

function getMonth tMonth
   return
itemOffset(tMonth,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
end getMonth



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html




More information about the Use-livecode mailing list