date

How to get delay of 30 sec in current time in php ?

Date("F d Y H:i:s") gives current time in php. How can I get delay of 30 secs and 1 min in current time using php, not sure but something like Date ("F d Y H:i:s-30") or Date("F d Y H:i-1:s") ? ...

get a date 6 years from now?

i want to have a date 6 years from now? how do i do that? ...

Get date format like "Y-m-d H:i:s" from a php date

Hello, did someone knows a way to get a string from date that contains the format of the date? <?php $date = date ("2009-10-16 21:30:45"); // smething like this? print date_format ($date); ?> I ask this because I'd like to optimize this function I've wrote, usual to get date with a different timezone from server, without ...

how to filter / query date using dojox.jsonPath.query

I am referring to use http://www.sitepen.com/blog/2008/03/17/jsonpath-support/ This is what I am doing (spent two days but no luck): first drawing a datagrid with integer column and a date column and also able to sort the columns values by clicking on the column header.. now using dojox.jsonPath.query to query numbers using syntax lik...

Use JavaScript to Parse Time

This is probably something easy, but I'm a bit confused how to do this. How can I, using JavaScript, parse only the time from the following ISO 8601 date string: 2009-12-06T17:10:00 In other words, with the string above, I'd like to output: 5:10 PM Any guidance/tutorials on this would be great. ...

Converting a date in MySQL from string field

I'm using a system where the dates are stored as strings in the format dd/mm/yyyy. Is it possible to convert this to yyyy-mm-dd in a SELECT query (so that I can use DATE_FORMAT on it)? Does MySQL have a date parsing function? Currently the only method I can think of is to concatenate a bunch of substrings, but hopefully there's a simple...

Finding Date Difference

What's the efficient way of finding say if a date is 5 days earlier than another day? Do I need to parse both days using a particular SimpleDateFormat first before I compare? ...

Date Input Validator (dd-MMM-yy, client side) ASP.NET 3.5 + MaskedEditValidator

I need a client-side date validator on a text box. BAM - Custom Validator. Operator="DataTypeCheck", Type="Date". Boo-ya. Golden, except that all dates get input in the format dd-MMM-yy. This method works fine for "12/12/2009" but fails on "12-Dec-09". So, how do I get client side validation of dates in whatever format I choose to ent...

Actionscript: Sorting ArrayCollection by date: YYYY-MM-DD

I have an ArrayCollection of Objects. Each Object has the following keys/values: {date: 2009-12-01, visits=13555, bouceRate=45} {date: 2009-12-05, visits=46955, bouceRate=45} {date: 2009-12-06, visits=13685, bouceRate=45} {date: 2009-12-02, visits=13685, bouceRate=45} {date: 2009-12-04, visits=68755, bouceRate=45} {date: 2009-12-03, vis...

php strtotime is choking on time zone string

<?php echo "Hello?"; $thetime = strtotime("Wed Dec 16 2009 00:00:00 GMT-0500 (Eastern Standard Time)"); var_dump($thetime); ?> This code evaluates to "bool(false)"; however, just removing "(Eastern Standard Time)" allows the strtotime function to evaluate correctly. Any ideas why strtotime is choking on the time zone bit of the str...

Timestamp of nearest valid month

Just a quickie.. How to derive the unixtime of nearest March or June? If the current month is February of 2009, the script should give the unixtime of March 01, 2009. If the current month is April of 2009, the script should give the unixtime of June 01, 2009. If the current month is October of 2009, the script should give the unixtime...

Asp.Net and Sql Server Time difference in days, hours, minutes...

I am working on a issue tracking application with asp.net and sql server 2005. While tracking the issues I am storing the deadline as datetime in the database and also if someone posts a message in the message board the posting date/time is also getting stored in the db as datetime. Now my requirement is to show the issue deadline as "2...

[Java] new Date(2009, 12, 9) is deprecated

What Can I used to replace this ? Thanks for your help ...

Javascript date to C# via Ajax

I have javascript date object which gives me a date string in this format, "Wed Dec 16 00:00:00 UTC-0400 2009". I pass this via Ajax to the server (ASP.NET c#) How can I convert, "Wed Dec 16 00:00:00 UTC-0400 2009" to a C# DateTime object. DateTime.Parse fails. ...

c# how to determine bios date change

Hello how can i determine with a program (c#) if the Bios Date has Change ? UPDATED i'm looking for the machine date, because I want write program that check if some body change that value, figure this out i hava a transaction file that record some info with date and time, and for the registration of this values i have a due time and i...

How to find the current biweekly period in Rails

I want to run some Find statements that only show results from the current two week period of a company - it's the pay period for the company. In other words, not necessarily just the last two weeks of records. A quick search looks like I am not going to be able to use a built-in Time method like Time.now.beginning_of_quarter or Time.n...

Getting last month's date in php

I want to get last month's date. I wrote this out: $prevmonth=date('M Y'); Which gives me the current month/year. I can't tell if I should use strtotime, mktime. Something to the timestamp? Do I need to add something afterwards to reset so that the date isn't set to last month throughout everything for all timestamps on my site? I'...

get years between 2 dates?

ive got 2 dates like: 2009-11-11 2002-11-11 and i want to get the years between them '7'. how should i do that? the month and day will always be identical and i dont want to use -. is there a appropiate way for this? ...

Get all the dates in a week of the selected date in jquery date picker?

I am creating a task list with number of hours worked to be entered against each task along each day of the week. So if a user clicks on a particular week dates then I need to get all the days' dates into hidden fields. Then I will use them to identify the which hours entry is against which date and insert them into the database. So for ...

C++ Boost date with format dd/mm/yyyy?

How could I print the current date, using Boost libraries, in the format dd/mm/yyyy H? What I have: boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); cout << boost::posix_time::to_simple_string(now).c_str(); 2009-Dec-14 23:31:40 But I want: 14-Dec-2009 23:31:40 ...