473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

converting epoch time to string (and vice versa)

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
Mar 13 '07 #1
1 2580
On Mar 13, 12:42 am, Astan Chee <s...@al.com.auwrote:
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

Mar 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Anand CS | last post by:
Hi All I have question regarding time data structures... I have 64 bit unsigned microsecond resolution (unsigned __int64 for windows/and unsigned long long for others) variable. It stores the...
1
by: Liviu BURCUSEL | last post by:
Hello ! It is late night and I cannot think right anymore. Please help me to convert a interval like '2 days 00:22:10.2905' in seconds. Thank you very much in advance, Liviu ...
5
by: bob | last post by:
Hi Using 2003 - targeting the compact framework (c#), but would like to do most development using the full.net (manually leaving out stuff not in the compact framework). Q. Trying to find a...
3
by: NateM | last post by:
How do I convert any given date into a milliseconds value that represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT? Is there an easy way to do this like...
6
by: marc | last post by:
hi im trying to convert Date() into a unix timestamp so i can stick the result into a mysql db, please help!
1
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the...
6
by: pavanponnapalli | last post by:
hi, i am using Date::Time and using localtime function to convert a given timestamp to epoch seconds. Everything is fine. The problem comes when we give date someting like 2008-11-31 04:45:45...
9
by: victory2006 | last post by:
I need help converting a list into a string ex/ i want to compare this, "110"(string) to this (list) to see if they are identical. So, how would you do this? convert the string into a list?...
7
by: victory2006 | last post by:
like we have an integer value of : 9 and i need to convert it to binary numbers and vice versa, thanks!
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.