doubt regarding Conversion of date into timestamp

P

praba kar

Dear All,

I am new to Python I want to know how to
change a time into timestamp

eg "Fri, 8 Apr 2005 09:22:14 +0900" like format
date I want to change as a timestamp.

I have used below code to get timestamp
import time
time.strptime(v,'%a, %d %b %Y %X +0900')

function. This function will return time stamp. But
If the format of date string is changed. This
function raise error

eg My web application always return different format
of date

Fri, 8 Apr 2005 10:31:37 +0530
Fri, 8 Apr 2005 10:11:03 +0900
Fri, 8 Apr 2005 09:40:47 +0800

Kindly help to resolve this problem.

with regards,
Prabahar

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
 

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
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top