Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > problems playing with dates from any month.

Reply
Thread Tools

problems playing with dates from any month.

 
 
krishnakant Mane
Guest
Posts: n/a
 
      08-02-2007
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.
 
Reply With Quote
 
 
 
 
kyosohma@gmail.com
Guest
Posts: n/a
 
      08-02-2007
On Aug 2, 12:31 pm, "krishnakant Mane" <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RFC-822 dates into Ruby dates kellygreer1 Ruby 1 06-08-2008 10:59 PM
Need to use dates earlier than 1900 (Time library says out of range for dates < 1900) me@benjaminarai.com Ruby 1 07-17-2007 02:25 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Dates dates dates dates... SQL and ASP.NET David Lozzi ASP .Net 1 09-30-2005 02:18 PM
Dates! Dates! Dates! PW ASP General 4 08-09-2004 04:42 PM



Advertisments