Hi I am using a DateTimeField in my class and want to do some tweaking with its object.
class ClinicVisitDateSettings(models.Model): name = models.CharField(max_length=80,blank=True,null=True) date_created = models.DateTimeField(blank=True,null=True) def __unicode__(self): return "%s %s" % (self.name, self.date_created.strftime("%A %B %d")) The user fills Gen GI in name and date along with time. What i am able to achieve with this class object to return is :- Gen GI Monday May 7 I want that the this class should return object like this :- Gen GI Monday AM, May 7 Pancreas Tuesday PM, May 8 How can achieve AM and PM also ? with this datetime object Thanks in advance -- Regards Nikhil Verma +91-958-273-3156
-- http://mail.python.org/mailman/listinfo/python-list