On 6/20/07, Joe Bloggs <[EMAIL PROTECTED]> wrote: > This means the duration is 25 minutes long. What would be the best field to > keep this data in? I suspect that I will use this data to calculate the end > time of the programme but the duration is also useful.
Assuming that another piece of metadata provided by the XML format is the date and time at which broadcast of the program begins (which would go into a DateTimeField), a PositiveIntegerField storing either the number of minutes or the number of seconds (probably preferable) of the duration would be a good choice -- you could then use Python's 'timedelta' class to calculate the time at which the program ends, by feeding the duration to timedelta's constructor and adding the resulting object to the datetime value of the program's start. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---