Comments (5)
Doesn't that work for me, any suggestions? @cognitom
My DATETIME is '2018-07-01T12:34:00.000Z', but in import to MySQL, the result is NULL.
from momy.
This fix date like this:
ISODate("2016-05-11T15:06:37.638Z") // This is an object ;)
from momy.
I have fixed DATETIME and DATE objects, I think TIME has a different behaviour. Please tell me if I'm right.
from momy.
Hi, I'm trying to understand the spec of MongoDB.
In Mongo shell, we can create a Date
object, and internally it is ISODate
, according to its text. Here're my quick study and results:
replicaset:PRIMARY> var d = new Date()
replicaset:PRIMARY> d
ISODate("2017-07-07T13:15:22.921Z")
replicaset:PRIMARY> typeof d
object
replicaset:PRIMARY> d instanceof ISODate
false
replicaset:PRIMARY> d instanceof Date
true
replicaset:PRIMARY> var dd = new ISODate()
replicaset:PRIMARY> dd
ISODate("2017-07-07T13:18:34.296Z")
replicaset:PRIMARY> dd instanceof ISODate
false
replicaset:PRIMARY> dd instanceof Date
true
Date()
behavior is the same asISODate
- The object is an instance of
Date
- The object is not an instance of
ISODate
So, it seems that we can detect a date object by val instanceof Date
.
@chemitaxis I've updated the code a bit for clarification and readability. a31e152
Could you pls check that the updated version still work in your environment? Thanks.
from momy.
Hi @cognitom sorry for the delay... I can tell you that your approach if correct, here you have a screenshot after import my data users. Thanks.
from momy.
Related Issues (20)
- MongoDB cannot login, always Authentication failed HOT 10
- mongo -> mysql import, ER_TOO_LONG_KEY HOT 2
- Is this supposed to support for array? HOT 5
- No more documents in tailed cursor HOT 2
- ns field has bson.D value that is not string or valid MongoDb HOT 2
- ER_PARSE_ERROR HOT 2
- Error When Streaming HOT 1
- Replica set with data HOT 1
- operation exceeded time limit
- dynamic addition of collections to sync HOT 1
- migrate into two database
- I want Mysql to mysql with live transfer
- datetime is null in mysql HOT 2
- First record empty and data not synced HOT 2
- Data not updated in MySQL after chagne in MongoDB HOT 3
- Custom converters or filters HOT 3
- Todo: code coverage HOT 1
- Todo: more tests
- Tests on Travis fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from momy.