[Tutor] Shifts and DateTime problems
Wed, 6 Feb 2002 15:51:49 -0800 (PST)
On Wed, 6 Feb 2002 firstname.lastname@example.org wrote:
> cursor.execute('select time("Begin") from shift where
> "Type" = \'Automedica\' ;') # backslashes needed to protect '
> I get what I want ... but this is a string I believe, not a DateTime
> variable or even an int.
Ah! Be careful: it's a LIST that contains a single string.
cursor.fetchone() always returns a list of columns, even if there's just
> b = DateTimeFrom(cursor.fetchone())
b = DateTimeFrom(cursor.fetchone())
instead; that should work better, although I haven't had enough time with
mx.DateTime to be sure about this.