Noob | datetime question

Demel, Jeff Jeff.Demel at JavelinDirect.com
Tue Nov 14 10:37:24 EST 2006


Perfect.  Thanks a million.

.strftime was the method I was looking for.

-Jeff
 

-----Original Message-----
From: python-list-bounces+jeff.demel=javelindirect.com at python.org
[mailto:python-list-bounces+jeff.demel=javelindirect.com at python.org] On
Behalf Of Kevin Kelley
Sent: Tuesday, November 14, 2006 9:34 AM
To: python-list at python.org
Subject: Re: Noob | datetime question

import time
FORMAT='%Y%m%d'

time.strftime(FORMAT,time.gmtime(time.time()+8380800))
output = '20070219'

--
Kevin Kelley


On 11/14/06, Demel, Jeff <Jeff.Demel at javelindirect.com> wrote:

	I'm having trouble finding exactly what I need by googling, so
thought
	I'd try to get a quick answer from the group.  This seems like
something
	that should be dead simple.
	
	I need to generate a string value of a date in the format
YYYYMMDD that 
	is 97 days in the future.  The datetime module is brand new to
me, and
	I'm not sure how to do this.  Can someone help me out here?
	
	TIA
	
	-Jeff
	This email is intended only for the individual or entity to
which it is addressed.  This email may contain information that is
privileged, confidential or otherwise protected from disclosure.
Dissemination, distribution or copying of this e-mail or any attachments
by anyone other than the intended recipient, or an employee or agent
responsible for delivering the message to the intended recipient, is
prohibited. If you are not the intended recipient of this message or the
employee or agent responsible for delivery of this email to the intended
recipient, please notify the sender by replying to this message and then
delete it from your system.  Any use, dissemination, distribution, or
reproduction of this message by unintended recipients is strictly
prohibited and may be unla! wful. 
	--
	http://mail.python.org/mailman/listinfo/python-list
	


This email is intended only for the individual or entity to which it is addressed.  This email may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or any attachments by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient of this message or the employee or agent responsible for delivery of this email to the intended recipient, please notify the sender by replying to this message and then delete it from your system.  Any use, dissemination, distribution, or reproduction of this message by unintended recipients is strictly prohibited and may be unlawful.



More information about the Python-list mailing list