converting epoch time to string (and vice versa)

A

Astan Chee

Hi,
I have a string in this format "DD/MM/YYY" for example:
tdate = "18/01/1990"
and Im trying to convert this to epoch time, can anyone help?
Im also trying to convert that epoch time to the string format
previously. Can anyone help this one too?
Thanks!
Astan
 
P

Paul McGuire

Hi,
I have a string in this format "DD/MM/YYY" for example:
tdate = "18/01/1990"
and Im trying to convert this to epoch time, can anyone help?
Im also trying to convert that epoch time to the string format
previously. Can anyone help this one too?
Thanks!
Astan

Read up on time.strftime() (_F_ormats a time to a string of various
styles) and time.strptime() (_P_arses a string of various formats into
a time).

-- Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top