<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br>Hi tim <br><br>Thank you very much ...I have got it now..now i can continue with the backup script i want to make<br><div>
<p align="center"><strong><font color="#cc3366" face="Arial Black, Geneva, Arial, Sans-serif" size="4"><em>$LIM $H@DY</em></font></strong></p></div><br><br><br><br>> Date: Thu, 22 Oct 2009 11:36:50 +0100<br>> From: mail@timgolden.me.uk<br>> CC: python-list@python.org<br>> Subject: Re: Date strftime('%d%m%y') date to be of yesterday<br>> <br>> baboucarr sanneh wrote:<br>> > <br>> > Hi tim,<br>> > <br>> > well i tried what your script but i do have an error<br>> >>>> import datetime<br>> >>>> yesterday = datetime.date.today () - datetime.timedelta (days=1)<br>> >>>> print yesterday.strftime ("%d%m%y")<br>> > SyntaxError: invalid syntax (<pyshell#2>, line 1)<br>> > <br>> > when i jus check the variable i.e yesterday i do get the out put but its in a different format<br>> > datetime.date(2009, 10, 21)<br>> > it seems like the conversion that is where the error is coming form <br>> > <br>> > I want it to be like 211009 <br>> > <br>> > Thank you<br>> <br>> <br>> I assume you're running Python 3.1? Try this:<br>> <br>> print (yesterday.strftime ("%d%m%y"))<br>> <br>> TJG<br>> -- <br>> http://mail.python.org/mailman/listinfo/python-list<br>                                          <br /><hr />Windows Live:  <a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010' target='_new'>Friends get your Flickr, Yelp, and Digg updates when they e-mail you.</a></body>
</html>