473,804 Members | 3,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Module on Getting the Date & Time

Is there a Modules in Python that returns the time &
date of today when ran?




_______________ _______________ ____
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
Jul 19 '05 #1
1 1376
Sara Khalatbari <sa************ @yahoo.com> writes:

Hi,
Is there a Modules in Python that returns the time &
date of today when ran?


You mean a method in a module? Yes, there's good 'ol time module, which will
probably provide what you need:
import time
time.time() # number of seconds (+ fract) elapsed after 01.01.1970 1115881981.3717 401 time.ctime() # current time in string format 'Thu May 12 10:13:20 2005' time.localtime( ) # current time as a tuple

(2005, 5, 12, 10, 13, 30, 3, 132, 1)

For details, see 'pydoc time'

--
# Edvard Majakari Software Engineer
# PGP PUBLIC KEY available Soli Deo Gloria!

$_ = '45647661726420 4d616a616b61726 92c206120436872 69737469616e20' ; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60 281449,'es'),2, 4),"\n";
Jul 19 '05 #2

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

Similar topics

1
1269
by: Sara Khalatbari | last post by:
Is there a Module in Python that gives you the time & date of today??? __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs
2
2303
by: David McBride | last post by:
I'm getting the following message when I run my Perl script that uses the XML::Writer module: "Processing instruction target begins with 'xml' at .../makeconf/LW/LWTest.pm line 75" The pi() statement is almost identical to the example for the module at cpan.org. In fact, I tried replacing my use with the example and got the same result. Can anyone tell me why I'm getting this warning, even though I'm getting the correct output?
42
5000
by: WindAndWaves | last post by:
Dear All Can you tell me why you use a class module??? Thank you Nicolaas ---
6
3684
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as development of reports, it is certainly fine in my book. But for end-users, with little experience or training, it would be nice to have an easy way to handle various selection criteria, perhaps with relatively stock reports. I see easy to use by...
11
3116
by: Steve | last post by:
Hi All, I'm having a tough time converting the following regex.compile patterns into the new re.compile format. There is also a differences in the regsub.sub() vs. re.sub() Could anyone lend a hand? import regsub
3
3104
by: divya | last post by:
Hi, I have a table tblbwday with 2 fields Name and Birthday.I have written this script for displaying evryday names of the people on that day. <% set objConn =server.createobject("ADODB.connection") objConn.open "DSN=Photo" Dim sqlSELsite,ObjRSSel sqlSELsite = "SELECT Name FROM tblbwday WHERE B'day ="& date() &" " '
0
1319
by: Steve | last post by:
To begin, I'm using Adobe's Spry Framework for all my data in my XML page, it saves space and code on the HTML. Well, I want to make it so that certain cells are chosen and are either highlighted with green or red depending on a condition. ====================================XML====================================== <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="bowlgames.xsl"?> <bowlgames>
2
5433
by: barronmo | last post by:
I'm trying to get the difference in dates using the time module rather than datetime because I need to use strptime() to convert a date and then find out how many weeks and days until that date. I'm a beginner so any help would be appreciated. Here is the code: def OBweeks(ptID): qry = 'SELECT short_des FROM problems WHERE patient_ID = %s;' % (ptID) results = EMR_utilities.getAllData(qry) for items in results:
3
5199
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9140
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.