Hi<div>Can I send date and time like Hex in to the Serial port or file.</div><div><br></div><div>------------------------------------</div><div><div>from time import *</div><div>def TimeMake():</div><div> '''Formating time and data (dd-mm-yy hh:mm) and change it like ASCII'''</div>
<div> Time=list(localtime()) #get Time and Date</div><div> Time[0]=str(Time[0]) #Make (yy) str </div><div> Time = '%02d-%02d-%s %02d:%02d' % (Time[2], Time[1], Time[0][2:], Time[4], Time[5]) #Formating (dd-mm-yy hh:mm)</div>
<div> TimeHex = []</div><div> for i in Time: #Take ASCII</div><div> TimeHex.append(ord(i))</div><div> Time =[]</div><div> for i in TimeHex: #Make ASCII in hex format</div><div> Time.append(hex(i))</div>
<div> return Time</div><div>Time=TimeMake()</div><div>#When I write it in the some file is a string but must to be like hex</div><div>------------------------------------</div><br>-- <br>Êðèëå èìàò ñàìî òèÿ, äåòî äåòî ñúðöåòî èì èñêà äà ëåòè !<br>
</div>