problems playing with dates from any month.

  • Thread starter krishnakant Mane
  • Start date
K

krishnakant Mane

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.
 
K

kyosohma

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top