Questions tagged [isodate]

Anything related to ISO standard date formats, i.e. a series of ISO-standardized formats for date and time information meant to be "understandable" worldwide, like the following string "2013-10-02 15:35:02".

Anything related to ISO standard date formats, i.e. a series of ISO-standardized formats for date and time information meant to be "understandable" worldwide.

For example, the following string "2013-10-02 15:35:02" represents the following time in ISO format:

   year: 2013
  month: 10
    day: 2
   hour: 15 
minutes: 35
seconds: 2
240 questions
8
votes
2 answers

JavaScript - How to save a date in MongoDB document in ISODate format?

I have been trying to save the date from javascript side into MongoDB in ISODate format. But it just saves the date field in my MongoDB document in string format. Here is the object I'm sending into the MongoDB to be saved as a document in a given…
Ravindu Nirmal Fernando
  • 4,272
  • 4
  • 18
  • 29
7
votes
1 answer

Date fields transformation from AWS Glue table to RedShift Spectrum external table

I am trying to transform the JSON dataset from S3 to Glue table schema into an Redshift spectrum for data analysis. While creating external tables, how to transform the DATE fields? Need to highlight the source data is coming from MongoDB in ISODate…
SunSmiles
  • 186
  • 9
7
votes
2 answers

Mongo : How to convert all entries using a long timeStamp to an ISODate?

I have a current Mongo database with the accumulated entries/fields { name: "Fred Flintstone", age : 34, timeStamp : NumberLong(14283454353543) } { name: "Wilma Flintstone", age : 33, timeStamp : NumberLong(14283454359453) } And so…
stackoverflow
  • 18,348
  • 50
  • 129
  • 196
5
votes
1 answer

MongoDB C++, How to add ISODate value when inserting

This is about the new MongoDB C++ Driver (not the legacy one). I can insert a document this way: value Value = document{} <<"Key" <<"Value" <
Dee
  • 7,455
  • 6
  • 36
  • 70
5
votes
1 answer

Getting unix timestamp in seconds out of MongoDB ISODate during aggregation

I was searching for this one but I couldn't find anything useful to solve my case. What I want is to get the unix timestamp in seconds out of MongoDB ISODate during aggregation. The problem is that I can get the timestamp out of ISODate but it's in…
5
votes
2 answers

Nanoseconds lost coming from MongoDB ISODate Object

I'm losing the nanoseconds from the MongoDb interface for the ISODate object. All the nanoseconds are set to zero when I read them in perl. First, my environment: MongoDB version: 1.8.2 perl v5.12.4 MongoDB perl module version: 0.701.4 I have a…
AndyFroncioni
  • 181
  • 1
  • 8
4
votes
3 answers

How is regex filter applied to date (isodate) type field in mongodb

I was trying to apply a regex filter(year) to a date type field but the query returned no results. So was trying to understand the behavior of this query? db.collection.find({"ReportedDate":/2016/i}) Note: I can filter it by date type without…
Sameer
  • 3,124
  • 5
  • 30
  • 57
4
votes
1 answer

importing CSV file MongoDB with ISODate

When I export my data from mongoDB I obtain the following file: Everything is a string in the mongoDB except for the date that is…
Lechucico
  • 1,914
  • 7
  • 27
  • 60
4
votes
1 answer

moment.js format date as iso 8601 without dashes?

How do I format a date as iso 8601 using moment.js but without the dashes and colons and setting the time to 0 e.g. if I have a date like this: 2016-10-08T09:00:00Z How do I format as : 20161008T000000Z Doing moment(date).toISOString() gives…
adam78
  • 9,668
  • 24
  • 96
  • 207
4
votes
1 answer

How to convert ISO Date to UTC date in Hive

I have JSON data as below: I need to convert that date or mongo_date into utc timestamp, to analyse the data in hive as per timeline example per year, per month, per week using map reduce { "_id" : ObjectId("51ac77050e9edcdad271ce2d"), …
Hari
  • 173
  • 1
  • 3
  • 11
4
votes
3 answers

Date day/minute in mongodb queries

I have time series data stored in a mongodb database, where one of the fields is an ISODate object. I'm trying to retrieve all items for which the ISODate object has a zero value for minutes and seconds. That is, all the objects that have a…
user1094206
  • 920
  • 1
  • 12
  • 24
4
votes
1 answer

Meteor Insert Date or Timestamp in Client Collection

I was expecting that an object with a Date property would be saved in Mongo as an ISODate from both client or server side, but this is not the case. When I do if (Meteor.is_client()){ Collection.insert({text : "Client", number : 1, date : new…
Rui Gonçalves
  • 1,164
  • 8
  • 15
3
votes
2 answers

What are the advantages of storing date in database as an ISODate as opposed to a simple text?

Why would I want to store as ISODate as opposed to simple text?
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169
3
votes
1 answer

Formatting date in find() mongoDB/mongoose query result?

My MongoDB collection have an ISODate field and I want to format the result to dd/mm/yyyy. My model: const Pedido = new Schema({ id: { type: String, required: true }, cliente: { type: Schema.Types.ObjectId, …
3
votes
3 answers

RegEx for validating correct ISO8601 date string

For example: 2013-08-11T17:22:04.51+01:00 In this stackoverflow answer cover ISODateTime without .51 part. Please help to correct this…
Bagrat
  • 65
  • 1
  • 6
1
2
3
15 16