dfdatetime

24 views
Skip to first unread message

Joshua Lewis

unread,
Jan 16, 2018, 10:14:15 PM1/16/18
to log2timeline-discuss
I am writing a parser for a sqlite db and the date/time for an event is written as unicode 2017-07-13 08:43:46.  What is the best way to get this into a dfdatetime object?

Thanks

Joachim Metz

unread,
Jan 17, 2018, 1:16:09 AM1/17/18
to Joshua Lewis, log2timeline-discuss
Joshua, if the date and time is formatted as "2017-07-13 08:43:46"
dfdatetime.TimeElements is the best class to use.

date_time = dfdatetime.TimeElements()
date_time.CopyFromDateTimeString('2017-07-13 08:43:46')
> --
> You received this message because you are subscribed to the Google Groups
> "log2timeline-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to log2timeline-dis...@googlegroups.com.
> To post to this group, send email to log2timeli...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages