Re: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread D'Arcy J.M. Cain
On Thu, 22 Oct 2009 10:56:07 +
baboucarr sanneh  wrote:
> > By the way, the convention on this list is to bottom-post,
> 
> okay i got that will be doing so from now on :)thnx

Thanks but what the previous poster forgot to mention was that you
should also trim the text that you are replying to.  Notice how I
trimmed everything up to now down to two lines.  This gives you the
gist of the conversation so far but makes it easier to read.  People
reading the exchange will get enough out of the above to remind
themselves where we are in the conversation and if necessary they can
simply go back and read the entire thread in the archives.

-- 
D'Arcy J.M. Cain  |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread baboucarr sanneh




$LIM $...@dy



> Date: Thu, 22 Oct 2009 11:51:08 +0100
> From: m...@timgolden.me.uk
> CC: python-list@python.org
> Subject: Re: Date strftime('%d%m%y') date to be of yesterday
> 
> baboucarr sanneh wrote:
> > 
> > Hi tim 
> > 
> > Thank you very much ...I have got it now..now i can continue with the 
> > backup script i want to make
> 
> 
> By the way, the convention on this list is to bottom-post,
> that is to add your comments / reply to the bottom of the
> post you're replying to. These things vary from one place
> to another, but it's only courteous to follow the local
> customs :)
> 
> TJG
> -- 
> http://mail.python.org/mailman/listinfo/python-list


okay i got that will be doing so from now on :)thnx

  
_
Windows Live Hotmail: Your friends can get your Facebook updates, right from 
Hotmail®.
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_4:092009-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread Tim Golden

baboucarr sanneh wrote:


Hi tim 


Thank you very much ...I have got it now..now i can continue with the backup 
script i want to make



By the way, the convention on this list is to bottom-post,
that is to add your comments / reply to the bottom of the
post you're replying to. These things vary from one place
to another, but it's only courteous to follow the local
customs :)

TJG
--
http://mail.python.org/mailman/listinfo/python-list


RE: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread baboucarr sanneh


Hi tim 

Thank you very much ...I have got it now..now i can continue with the backup 
script i want to make

$LIM $...@dy



> Date: Thu, 22 Oct 2009 11:36:50 +0100
> From: m...@timgolden.me.uk
> CC: python-list@python.org
> Subject: Re: Date strftime('%d%m%y') date to be of yesterday
> 
> baboucarr sanneh wrote:
> > 
> > Hi tim,
> > 
> > well i tried what your script but i do have an error
> >>>> import datetime
> >>>> yesterday = datetime.date.today () - datetime.timedelta (days=1)
> >>>> print yesterday.strftime ("%d%m%y")
> > SyntaxError: invalid syntax (, line 1)
> > 
> > when i jus check the variable i.e yesterday i do get the out put but its in 
> > a different format
> > datetime.date(2009, 10, 21)
> > it seems like the conversion that is where the error is coming form 
> > 
> > I want it to be like 211009 
> > 
> > Thank you
> 
> 
> I assume you're running Python 3.1? Try this:
> 
> print (yesterday.strftime ("%d%m%y"))
> 
> TJG
> -- 
> http://mail.python.org/mailman/listinfo/python-list
  
_
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail 
you.
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-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread Tim Golden

baboucarr sanneh wrote:


Hi tim,

well i tried what your script but i do have an error

import datetime
yesterday = datetime.date.today () - datetime.timedelta (days=1)
print yesterday.strftime ("%d%m%y")

SyntaxError: invalid syntax (, line 1)

when i jus check the variable i.e yesterday i do get the out put but its in a 
different format
datetime.date(2009, 10, 21)
it seems like the conversion that is where the error is coming form 

I want it to be like 211009 


Thank you



I assume you're running Python 3.1? Try this:

print (yesterday.strftime ("%d%m%y"))

TJG
--
http://mail.python.org/mailman/listinfo/python-list


RE: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread baboucarr sanneh


Hi tim,

well i tried what your script but i do have an error
>>> import datetime
>>> yesterday = datetime.date.today () - datetime.timedelta (days=1)
>>> print yesterday.strftime ("%d%m%y")
SyntaxError: invalid syntax (, line 1)

when i jus check the variable i.e yesterday i do get the out put but its in a 
different format
datetime.date(2009, 10, 21)
it seems like the conversion that is where the error is coming form 

I want it to be like 211009 

Thank you

$LIM $...@dy



> Date: Thu, 22 Oct 2009 11:14:46 +0100
> From: m...@timgolden.me.uk
> CC: python-list@python.org
> Subject: Re: Date strftime('%d%m%y') date to be of yesterday
> 
> baboucarr sanneh wrote:
> > 
> > Hi all
> > 
> > I want to output the date of the with this format strftime('%d%m%y') but 
> > the date ie '%d' should be the date of yesterday
> > eg
> > 
> > import time
> > strftime('%d%m%y') # something like minus a day..
> > Thank you..am a newbie to python
> 
> 
> 
> import datetime
> yesterday = datetime.date.today () - datetime.timedelta (days=1)
> print yesterday.strftime ("%d%m%y")
> 
> 
> TJG
> -- 
> http://mail.python.org/mailman/listinfo/python-list
  
_
Windows Live: Keep your friends up to date with what you do online.
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_1:092010-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread Tim Golden

baboucarr sanneh wrote:


Hi all

I want to output the date of the with this format strftime('%d%m%y') but the 
date ie '%d' should be the date of yesterday
eg

import time
strftime('%d%m%y') # something like minus a day..
Thank you..am a newbie to python




import datetime
yesterday = datetime.date.today () - datetime.timedelta (days=1)
print yesterday.strftime ("%d%m%y")


TJG
--
http://mail.python.org/mailman/listinfo/python-list


Date strftime('%d%m%y') date to be of yesterday

2009-10-22 Thread baboucarr sanneh


Hi all

I want to output the date of the with this format strftime('%d%m%y') but the 
date ie '%d' should be the date of yesterday
eg

import time
strftime('%d%m%y') # something like minus a day..
Thank you..am a newbie to python




  
_
Keep your friends updated—even when you’re not signed in.
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_5:092010-- 
http://mail.python.org/mailman/listinfo/python-list