datetime

How to get current date and time in Yahoo Pipes?

Is there a way to get current date and time in Yahoo Pipes? I need this to create a pipe with only the newest questions from SO as I don't want to wait for SO team to implement RSS for this... ...

applying a datepicker to a mask

I'm new to the javascript and web development scene so bear with me. On a website I'm programming for, I have a table filled with date values from a server side source. Upon clicking a section of a table, the text will be replaced by a input textbox that contains the date that was clicked on(applying a mask) and when the textbox appear...

How to parse an ISO-8601 duration in Objective C?

I'm looking for an easy way to parse a string that contains an ISO-8601 duration in Objective C. The result should be something usable like a NSTimeInterval. An example of an ISO-8601 duration: P1DT13H24M17S, which means 1 day, 13 hours, 24 minutes and 17 seconds. ...

How to form "fuzzy date" in Ruby?

How do I form "fuzzy" date/time from RFC 2822 formatted (Sat, 18 Jul 2009 10:57:43 +0300) timestamp? With fuzzy date I mean like: "5 minutes ago", "2 days, 15 minutes ago". ...

library to parse a relative date (like google calendar can) in c#

Hi, I'm asking the same question as this: http://stackoverflow.com/questions/296738/how-can-i-parse-relative-dates-with-perl but in C#. Sorry if this is a duplicate, ill delete if so. Does such a library exist? Thanks ...

Sum amount of overlapping datetime ranges in MySQL

I have a table of events, each with a StartTime and EndTime (as type DateTime) in a MySQL Table. I'm trying to output the sum of overlapping times and the number of events that overlapped. What is the most efficient / simple way to perform this query in MySQL? CREATE TABLE IF NOT EXISTS `events` ( `EventID` int(10) unsigned NOT NUL...

LinqToSQL DateTime filters?

I've got a linqtosql query filtering and ordering by a datecolumn that takes 20 seconds to run. When I run the generated sqlquery directly on the DB it returns in 0 seconds. var myObjs = DB.Table .Where(obj => obj.DateCreated>=DateTime.Today) .OrderByDescending(obj => obj.DateCreated); The table has only 100,000 records and the DateT...

Checking if Var from LINQ query is Null and returning values older than x

Hello everyone I'm currently having 2 issues with the code below: Upon return of result1 I'm trying to complete a check to see if it is != null and if it is't it will begin to delete the records selected. The issue is that even when result1 returns nothing and defaults the if statement doesn't pick this up so I guess I'm missing someth...

Problem passing dates to a webservice method (SqlDateTime overflow)

I have a VS2008 solution containing two projects, a web service (the actual work I'm doing) and a web application (that I'm using to test the service). The latter has a "web reference" to the former. It is also set as the startup project, so that when I start debugging VS sets up two ports on localhost, one for the app (which runs its de...

Why parsing '23:00 PM' with SimpleDateFormat("hh:mm aa") returns 11 a.m.?

Finally I managed to understand what the problem was. I should hold on my string 11 PM instead of 23 PM What I don't understand is why parsing '23:00 PM' with SimpleDateFormat("hh:mm aa") returns 11 a.m.? My guess is it adds 12 hrs to the parsed date. I hope there is not much problem. ...

Date/Time input for an HTML Form

I'm having trouble finding an elegant way to allow for date/time input in an html form. I am thinking of having drop down menus for year, month, day, hour, minute, second, millisecond that are populated with valid entries only. I could do this by hard coding values for each drop down menu, but I'm thinking there must be a more elegant wa...

How to format a java.sql Timestamp for displaying ?

How do I formate a java.sql Timestamp to my liking ? ( to a string, for display purposes) ...

Creating DateTime from user inputted date

I'm pretty new to Python and App Engine, but what I'm trying to do is store a model which contains a DateProperty, and that DateProperty is populated with a Date entered by the user in a web form. I've got the model of: class Memory(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) date = db....

can i find out when a webpage was last uploaded?

as the question asks, is there a way of finding when a page was uploaded/updated last. I've got a client who has an 'SEO' company and I've just been asked by client if i've changed the the ftp login details, i haven't but it could be the seo company, want to know if they've updated a page and uploaded it after i did.... thanks in advanc...

Finding local time zones in rails

I'm wondering if there is an easy way to look up a user's local time zone in Rails using only an IP address. I don't want users to have to input their time zone themselves. Do I have to use JavaScript or is there a different way? ...

Get the unix timestamp of midnight on the previous Wednesday

How would I go about finding the unix timestamp of midnight of the previous Wednesday? My only approach would be to get the day index and day number of today, and subtract the difference, but I can think of several scenarios where this would fail, for example, early in a month before a Wednesday has happened. I guess, more concisely, ho...

Localizing Date Ranges

Does anyone know how to localize date ranges using C#? In particular, I want to generate "smart" date ranges, so that redundant information is eliminated. Here are some examples in US English August - Sept, 2009 August 2009 August 1 - 9, 2009 January 1 - March 3, 2009 December 6, 2009 - January 8, 2010 Form what I can tell the .NE...

Adding java time objects

How do you say, add 1 hour to a given result from calendar.getTime? ...

C# newbie: calculate days remaining to a birthday?

Hello, I have a DateTime object with a person's birthday. I created this object using the person's year, month and day of birth, in the following way: DateTime date = new DateTime(year, month, day); I would like to know how many days are remaining before this person's next birthday. What is the best way to do so in C# (I'm new to the...

c# datetime to sql with including seconds

hi, i am trying to save (using linq) the date and time to an SQL field (datetime data type) using Datetime.Now but the seconds are not coming through. Does anyone know how to rig that up? Ta. ...