need to divide a date

N

nephish

Hey there,
i am doing a plotting application.
i am using mxRelativeDateTimeDiff to get how much time is between
date x and date y

now what i need to do is divide that time by 20 to get 20 even time
slots
for plotting on a graph.

For example, if the difference between them is 20 hours, i need 20
plots, each an hour apart. if its 40 minutes, i need 20 plots that are
2 minutes apart.

what would be a way i could pull this off?

thanks
 
S

Steve Holden

Hey there,
i am doing a plotting application.
i am using mxRelativeDateTimeDiff to get how much time is between
date x and date y

now what i need to do is divide that time by 20 to get 20 even time
slots
for plotting on a graph.

For example, if the difference between them is 20 hours, i need 20
plots, each an hour apart. if its 40 minutes, i need 20 plots that are
2 minutes apart.

what would be a way i could pull this off?

thanks
C:\Steve\Projects\Python>python
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information..... print dt.DateTime(2000) + i*(rdt/20)
....
C:\Python24\lib\site-packages\mx\DateTime\DateTime.py:585:
DeprecationWarning: i
nteger argument expected, got float
return DateTime(year, month, 1) + \
2000-01-01 00:00:00.00
2000-01-02 00:00:00.00
2000-01-03 00:00:00.00
2000-01-04 00:00:00.00
2000-01-05 00:00:00.00
2000-01-06 00:00:00.00
2000-01-07 00:00:00.00
2000-01-08 00:00:00.00
2000-01-09 00:00:00.00
2000-01-10 00:00:00.00
2000-01-11 00:00:00.00
2000-01-12 00:00:00.00
2000-01-13 00:00:00.00
2000-01-14 00:00:00.00
2000-01-15 00:00:00.00
2000-01-16 00:00:00.00
2000-01-17 00:00:00.00
2000-01-18 00:00:00.00
2000-01-19 00:00:00.00
2000-01-20 00:00:00.00
Does this help?

regards
Steve
 

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
474,264
Messages
2,571,323
Members
48,005
Latest member
ChasityFan

Latest Threads

Top