Returns the x-position for the inputed date time.
        
        :return     <float>

def datetimeXPos(self, dtime):
        """
        Returns the x-position for the inputed date time.
        
        :return     <float>
        """
        gantt = self.ganttWidget()
        scale = gantt.timescale()
        
        # calculate the distance for a minute
        if scale == gantt.Timescale.Minute:
            dstart = gantt.dateTimeStart()
            secs = dstart.secsTo(dtime)
            return secs
        
        # calculate the distance for an hour
        elif scale == gantt.Timescale.Hour:
           dstart = gantt.dateTimeStart()
           secs = dstart.secsTo(dtime)
           return secs / 2.0
        
        # calculate the distance for a day
        elif scale == gantt.Timescale.Day:
            dstart = QDateTime(gantt.dateStart(), QTime(0, 0, 0))
            secs = dstart.secsTo(dtime)
            return (secs / (60.0 * 2.0))
        
        # calculate the distance off the date only
        else:
            return self.dateXPos(dtime.date())