Confusion converting DateTime<Utc> value to BigInteger for SQLite #2555
Unanswered
zebrapurring
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I'm trying to add column
timestamp
for my SQLite entity where I would like:chrono::DateTime<chrono::Utc>
BIGINTEGER
containing the date time value in milliseconds (UNIX time)So far I tried the following:
However when I insert an entity I see the generated timestamp value is a string in format
YYYY-mm-dd HH:MM:SS +00:00
. How can I map theDateTime<Utc>
value to milliseconds asi64
(and viceversa) when interfacing with the database?Beta Was this translation helpful? Give feedback.
All reactions