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

Forum statistics

Threads
474,262
Messages
2,571,053
Members
48,769
Latest member
Clifft

Latest Threads

Top