datetime

Nullable DateTime Parameter is never bound when calling the action

I have the following function signuture: public JsonResult PopulateGrid(int page, Guid? accountId, Guid? systemUserId, Guid? branchId, DateTime? fromDate, DateTime? toDate, HomeVisitType? homeVisitType) Every single parameter is bound just fine except toDate which turns out to be always null. When inspecting the Request.QueryString["t...

How do I query a time server (like NIST) from ASP?

Hello world, I would like to validate my Windows 2000 server time by querying an external time source (like NIST) using ASP. I can't seem to find any examples of this on the web. Thanks in advance, Cliff ...

PHP createFromFormat for 5.2 version

Hello. The title says all I want to know. Is there any function or I have to make it myself? Thanks! Edit: Ok. Thats great, in the server I'm developing for it works just perfect. But in my computer where the development server is hosted I'm using windows. strptime -> Note: This function is not implemented on Windows platforms. Is ...

using the php date/time classes I'm trying to get certain specific days

I am trying to find the right string to modify a DateTime object. I have a recurring calendar object: Currently finding 'this date of next month' is easy enough: $start_date->modify('+1 month'); However, I am also looking to find 'this day of next month' and 'this day of next year'. Couldn't find the relevant strings. Cheers EDIT: S...

SQL: select one record for each day nearest to a specific time

I have one table that stores values with a point in time: CREATE TABLE values ( value DECIMAL, datetime DATETIME ) There may be many values on each day, there may also be only one value for a given day. Now I want to get the value for each day in a given timespan (e.g. one month) which is nearest to a given time of day. I onl...

Dealing with dates in mysql?

EDIT: changed the whole question sorry, im trying to deal with the mysql DATETIME values, this is my mysql query: $result="SELECT u.username, u.picture, m.id, m.user_note, m.reply_id, m.reply_name, m. m.dt FROM relationships r, notes m, user u WHERE m.user_id = r.leader AND r.leader = u.user_id AND r.listener ='".$_SESSION['user_id']."'...

How do I find the hour difference between two dates in PHP?

I have two dates, formated like "Y-m-d H:i:s". I need to compare these two dates and figure out the hour difference. ...

Lotusscript date time issues

I have a couple of dates stored in a view. And I am using getItemValue to retrieve them. Dim repsondedDate As NotesDateTime Set repsondedDate = timePart1doc.GetItemValue("dateResponded") When I try to do the following, I get a type missmatch at run time. Dim dateDifference As double Set dtLocal = New NotesDateTime( Now ) dateDifferenc...

Why will this DateParser not work in Safari?

I render this JSON object: [{"created_at":"2010-09-21T20:41:28Z","subject":"hello world"}] Then I use this date parser to parse it (see below), but it only works in Chrome 6.0.4, Firefox 3.6.8, but NOT Safari 5.0.2 --- I get NaN errors. What gives? Date.prototype.toRelativeTime = function(now_threshold) { var delta = new Date() - t...

System.OutOfMemoryException thrown when computing date ranges

It might be a simple fix, but I can't for the life of me think of how to do this. I compute a bunch of StartDates and End Dates into a bunch of arrays of dates using this query: this.Reserved = unit.Reservations.Where(r => r.Active.HasValue && r.Active.Value).SelectMany(r => Utilities.DateRangeToArray(r.StartDate, r.EndDate)).ToArray();...

PHP: date function to get month of the date

Hi, I want to be able to figure out the month of date variable. I'm ex vb.net and the way to do it there is just date.Month. How do I do this in PHP? Thanks, Jonesy I used date_format($date, "m"); //01, 02..12 This is what I wanted, question now is how do i compare this to an int since $monthnumber = 01 just becomes 1 ...

ASP.net MVC - Model with DateTime, trying to serialize for Json() for jqGrid

I've got a model... [DataContract] public class DeviceModel { [DataMember(Order=1)] public string Alias { get; set; } [DataMember(Order = 2)] public string Location { get; set; } [DataMember(Order = 3)] public string State { get; set; } [DataMember(Order = 4)] ...

MySQL datetime into PHP

I have found a proper solution to my "problem" but even after reading mysql pages, I don't understand the logic behind it. I currently store registration information in my system in a "datetime" formatted field in one of my tables (YYYY-MM-DD hh:mm:ss). When I want to display the data on one of my php pages, simply posting the exact fi...

ASP.NET C# String to DateTime woes

This is going to sound very silly but I can't get a string to convert into a DateTime that carries the date and time I try this : Response.Write(year + " " + month + " " + day + " " + hour + " " + min ); //prints 2008 9 23 11 59 0 (represents 9/23/2008 11:59 00 AM) DateTime dt= new DateTime(year , month , day , hour , min , 00); Bu...

obtaining ammount of days of a given month with jodatime (Java)

30 days hath September, April, June and November, All the rest have 31, Excepting February alone (And that has 28 days clear, With 29 in each leap year). Can I obtain this info anagrammatically? (I don't mean the poem, of course) Thanks! Manuel ...

a days's worth of data in diff local times

I have a winform client and wcf service that together display historical data. the data stored in the db with utc timestamps. If two clients in different time zones want to look at a most recent day's worth of data based on their local time, can it be possible that they would be looking at different sets of data? ...

How to get local date with correct timezone (with daylight savings) using only hoursOffset and minutesOffset

I need to a date to the user's timezone. I know the hours and minutes offset of the timezone. So, I have two variables hoursOffset and minutesOffset. I need to figure out the timezone from that, if daylight savings exists right now, and then get the correct local date with javascript. I'm not sure how to check if daylight savings ex...

converting dates between timezones in AppModel->afterFind (cakePHP)

I have a cakePHP application that is pulling data from two different databases, which store dates and times in their data from different timezones. One database's timezone is Europe/Berlin, and the other's is Australia/Sydney. To make things more complicated, the application is hosted on a server in the US, and times must be presented to...

How do you convert an ISO 8601 date to a UNIX timestamp in Ruby?

I've been trying Time.parse() and Date.parse(), but can't see to figure it out. I need to convert a date in the form "2007-12-31 23:59:59" to a UNIX timestamp. Something like PHP's strtotime() function would be perfect. ...

Why is the UITypeEditor "DateTimeEditor" not visible in the object browser ?

Hi, I'm writing a custom control (using VS2010 & C#) and it has a property which is a nullable datetime. Why is it that, when defining my property, I can write this... [Editor("System.ComponentModel.Design.DateTimeEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] public D...