Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   problems playing with dates from any month. (http://www.velocityreviews.com/forums/t526527-problems-playing-with-dates-from-any-month.html)

krishnakant Mane 08-02-2007 05:31 PM

problems playing with dates from any month.
 
hello,
I have a very strange problem and I can't find any solution for that.
I am working on an accounting package which I wish to develop in python.
the simple problem is that I want to knoe how I can know if the given
date is the nth day of a month.
for example if a customer is supposed to pay his installment on every
5th of all months,
I want to know if today is the fifth day (jan the fifth, feb the fifth
etc) for any given month.
I have not found any such function.
if I have looked (or over looked ) in the wrong places I am really sorry.
secondly I also want to know the way in which I can convert a given
string to a date object.
for example if I have a string "29/09/2005", I know it is a valid date
although it is in a string form.
now I want to convert the above string into a real date object.
how can I cast it this way?
regards,
Krishnakant.

kyosohma@gmail.com 08-02-2007 06:14 PM

Re: problems playing with dates from any month.
 
On Aug 2, 12:31 pm, "krishnakant Mane" <researchb...@gmail.com> wrote:
> hello,
> I have a very strange problem and I can't find any solution for that.
> I am working on an accounting package which I wish to develop in python.
> the simple problem is that I want to knoe how I can know if the given
> date is the nth day of a month.
> for example if a customer is supposed to pay his installment on every
> 5th of all months,
> I want to know if today is the fifth day (jan the fifth, feb the fifth
> etc) for any given month.
> I have not found any such function.
> if I have looked (or over looked ) in the wrong places I am really sorry.
> secondly I also want to know the way in which I can convert a given
> string to a date object.
> for example if I have a string "29/09/2005", I know it is a valid date
> although it is in a string form.
> now I want to convert the above string into a real date object.
> how can I cast it this way?
> regards,
> Krishnakant.


You should also check this place out: http://labix.org/python-dateutil

Lots of cool date manipulation using the dateutil module.

Mike



All times are GMT. The time now is 01:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.