problems playing with dates from any month.

Discussion in 'Python' started by krishnakant Mane, Aug 2, 2007.

  1. 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.
    krishnakant Mane, Aug 2, 2007
    #1
    1. Advertising

  2. krishnakant Mane

    Guest

    On Aug 2, 12:31 pm, "krishnakant Mane" <> 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
    , Aug 2, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Lozzi

    Dates dates dates dates... SQL and ASP.NET

    David Lozzi, Sep 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    842
    Rob Schieber
    Sep 30, 2005
  2. Michal Maciejczak
    Replies:
    1
    Views:
    1,970
    Matthias Kaeppler
    Apr 23, 2005
  3. Bill
    Replies:
    10
    Views:
    719
    Fulvio
    Apr 13, 2006
  4. Replies:
    1
    Views:
    434
    Steve W. Jackson
    Dec 22, 2006
  5. PW

    Dates! Dates! Dates!

    PW, Aug 7, 2004, in forum: ASP General
    Replies:
    4
    Views:
    176
    Mark Schupp
    Aug 9, 2004
Loading...

Share This Page