Best way to store date/time in mongodb
I’ve seen using strings, integer timestamps and mongo datetime objects. 4 Answers 4
I’ve seen using strings, integer timestamps and mongo datetime objects. 4 Answers 4
I can format the Get-Date cmdlet no problem like this: $date = Get-Date -format “yyyyMMdd” But once I’ve got a date in a variable, how do I format it? The statement below $dateStr = $date -format “yyyMMdd” returns this error: “You must provide a value expression on the right-hand side of the ‘-f’ operator” 12 … Read more
Say I have an interval like 4 days 10:00:00 in postgres. How do I convert that to a number of hours (106 in this case?) Is there a function or should I bite the bullet and do something like extract(days, my_interval) * 24 + extract(hours, my_interval) 7 Answers 7
I have two objects that represent the same event instance — one holds the date, the other the time of this event, and I want to create a datetime object. Since one can’t simply add date and time objects (following call fails): datetime.date(2011, 01, 01) + datetime.time(10, 23) 1 Answer 1
Just started with the playground. I’m trying to create a simple app. I’ve created a date object like this: var date = NSDate() How can I get the current hour? In other languages I can do something like this: var hour = date.hour But I can’t find any properties/methods like that. I’ve found a method, … Read more
ISO 8601 and RFC 3339 seem to be two formats that are common the web. Should I use one over the other? Is one just an extension? Do I really need to care that bad? 5 Answers 5
Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap? As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2. 3 36
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago. The community reviewed whether to reopen this question 5 months ago and left it closed: Original close reason(s) … Read more
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago. The community reviewed whether to reopen this question 5 months ago and left it closed: Original close reason(s) … Read more