.NET Equivalent to DateJS
I like the different human readable strings you can parse with the DateJS javascript project (http://www.datejs.com/). I was wondering if anyone knew of any .NET library that could parse simiilar strings in .NET? ...
I like the different human readable strings you can parse with the DateJS javascript project (http://www.datejs.com/). I was wondering if anyone knew of any .NET library that could parse simiilar strings in .NET? ...
I have two columns: beginTime and duration. I'm trying to calculate the endTime. The problem is that i get empty results back. I have tried several things. DATE_ADD(startTime, INTERVAL `duration` MINUTE) AS endTime DATE_ADD(startTime, INTERVAL '10' MINUTE) AS endTime DATE_ADD(startTime, INTERVAL 10 MINUTE) AS endTime But everytime ...
Is there an easy way to format the display of a DateTime value in a Rails view? For example, if I'm doing something like: <%= text_field :my_object, :start_date %> and only want to display the Date part of the :start_date (i.e. I want to hide the time part), is there a way to format the :start_date string inside of the view such that...
I am attempting to implement Martin Fowler's class model for recurring events in PHP. The DateTime and DatePeriod PHP objects look like they might be a good fit for dealing with temporal expressions. The issue is that I need to be able to perform UNION, INTERSECT and DIFFERENCE operations on the DatePeriods so that I can calculate expres...
SELECT gameratingstblx245v.gameid,avg( gameratingstblx245v.rating ) as avgrating, count(gameratingstblx245v.rating) as count,gamedata.name ,gamedata.gameinfo FROM gameratingstblx245v LEFT JOIN gamedata ON gamedata.id = gameratingstblx245v.game_id WHERE gameratingstblx245v.game_id=gameratingstblx245v.game_id GROUP BY gameid ORDER BY a...
I want to trap values that are like this (in which there is not 'time info' on the datetime): datetime.datetime(2009, 4, 6, 0, 0) Is there a better way to detect these values other than testing hour/minute/second? if value.hour == 0 and value.minute == 0 and value.second == 0: # do stuff ...
This question is related to this question I have a field which is a time-field (it does not need to be a datetime field, cause the date part makes no sense here). The value i want to add is in another field, in minutes. So basicly, I want to add minutes to a time value. I have tried the DATE_ADD function, but it expects the date to be ...
I want to to select the time of a date from database. How can I do this using postgresql database? Thanks in advance ...
Is there a way to create a JSON object in PHP that contains a javascript date object? Does json_encode automatically convert PHP's DateTime to Javascript's date? ...
I am trying to verify that a C# string is compliant with XML Schema dateTime format. Looking at the MSDN, it seems like "o", "s", or "u" standard format strings could all describe valid dateTimes, but I can't get DateTime.ParseExact to work for me. What am I doing wrong here? string myDate = "1999-05-31T13:20:00.000-04:00"; DateTime.Par...
I have a date/time field from a shopping cart API feed, but I don't know what format it is in and I don't have access to the database. What could [1252457867] be for a date? These dates are all within the last couple weeks Any ideas? ...
Hi, I have problem with getting server date (linux server). When I use linux 'date' command I get properly date value (real date). If I modify some file on server, modify date is also properly (real date). But if i use java code System.out.println(new Date()) on server I get date with 1 hour difference i.e. linux 'date' command result = ...
Table example: TableName:DownTime Columns: EventID - int, ReasonID - int, StartTime - DateTime, EndTime - DateTime I would like to calculate the daily downtime of each event over the last 30 days. However, an event could be down for multiple days, so the start time would could start 31 days prior and could end next week. So I need...
I have a datetime field (endTime) in mysql. I use gmdate() to populate this endTime field. The value stored is something like 2009-09-17 04:10:48. I want to add 30 minutes to this endtime and compare it with current time. ie) the user is allowed to do a certain task only 30 minutes within his endTime. After 30 minutes of his endTime, ...
I have the following function DateTime fromDateParam = DateTime.ParseExact(Convert.ToString(DateTime.MinValue),"dd.MM.yyyy HH:mm:ss",null); It says input string not recognised as a valid date. Any ideas how I can get any the min date recognised to parse exact? ...
This is what I have so far. /// <summary> /// Gets the date. /// </summary> /// <param name="date">The date: 05/07/2009</param> /// <returns></returns> private static DateTime GetDate(string date) { DateTime postDate = DateTime.Parse(date); postDate.AddHours(DateTime.UtcNow.Hour); postDate.AddMinutes(DateTime.UtcNow.Minute)...
How can I test two datetimes (not including their time components) for equality? ...
I have the following date stored as a string 04.09.2009 (dd.mm.yyyy) Now I would like it changed to this format: 2009/08/31 (yyyy/mm/dd) Remember output should be a string value and the input date is a string. What is the best way to convert it with minimal effort? ...
I want to accept a Date format according to an ISO (can't remember which one)... 2009-09-17T13:03:00 How do I do this? I'm currently using a SimpleDateFormat but when I run my unit test against it, it fails. DateFormat df = SimpleDateFormat("yyyy-MM-ddTHH:mm:ss"); Unit Test is passing it this string: String test1 = "2009-09-17T13:...
Duplicate of: How to get timestamp of tick precision in .NET / C#? How do i get from Stopwatch.GetTimestamp() to a DateTime Assume Stopwatch.IsHighResolution is true ...