I have a database of users. I would like to create a graph based on userbase growth. The query I have now is:
SELECT DATE(datecreated), count(*) AS number FROM users
WHERE DATE(datecreated) > '2009-06-21' AND DATE(datecreated) <= DATE(NOW())
GROUP BY DATE(datecreated) ORDER BY datecreated ASC
This returns almost what I want. If we ge...
Hi, I am new to php. And I would like to know some of the date manipulation things in php.
// Get Current date
$date = date("Y-m-d");
What if I want to subtract current date and a specific date, lets say "today - 2008-06-26"?
Q1: How to do date math manipulation (add, minus, multply etc) in php?
Q2: If today, a subscriber subscrib...
I have Fri Jun 26 23:05:00 -0400 2009
Which I'd like to convert into Eastern (US) time.
How can this be done with Ruby?
Thanks
...
How do I get the file size and date stamp of a file on Windows in C++, given its path?
...
I have a table that has three different date columns, so I set each column as type 'date'.
However whenever im importing dates it seems to change them, and I have found it is because mysql does not allow null days and months.
My dates range from
1909-00-00
1963-09-00
1907-11-30
so sometimes we dont know the month, sometimes the day, ...
Hi,
I have two different tables, lead and click. I would like to query MySQL to get the sum of the commissions generated by clicks and leads ordered by date.
Lead
id|date|commission
Click
id|date|commission
(Both have other fields, but they aren't important for this question.)
So if I had:
Lead:
1|2009-06-01|400
2|2009-06-01|3...
In C++ what is the simplest way to add one day to a date in this format:
"20090629-05:57:43"
Probably using Boost 1.36 - Boost::date, Boost::posix_date or any other boost or std library functionality, I'm not interested in other libraries.
So far I came up with:
format the string (split date and time parts as string op) to be able t...
I need to check whether a given date is in the preceding month for a monthly query. I can get
CURRENT DATE - 1 MONTH
to compare the selected date with, but I can't assume the current date will be the first day of each month exactly. Is there a built in way to get the first day of the month without extracting the year and month and glu...
Is there any weather api that supports query weather for a specific date(or date range)?
In my application, i need to show weather for today but last year.
I can store weather in DB for aech day since now, and next year i'll be able to show last year's data. But it's not "sexy" solutions.
Any ideas?
Thank you.
...
I have this code :
var dp:Array = new Array();
for ( var i:int = 0; i < e.result.length; i++ )
{
var row:Object = e.result[i];
dp.push( row );
}
The row object consists data for different columns of a datagrid. dp.push(row) pushes the data onto the datagrid.
Columns with index 3 and 4 have type of "DATE" with whole...
One of the fields in my database is of 'DATE' Type (field-name = 'post_date').
after fetching an array $record = mysql_fetch_array($queryResult);
if I do echo $record['post_date'];
I do not get any output (blank).
What should I do to properly handle the date type?
...
I have a mysql table with data connected to dates. Each row has data and a date, like this:
2009-06-25 75
2009-07-01 100
2009-07-02 120
I have a mysql query that select all data between two dates. This is the query:
"SELECT data FROM tbl WHERE date BETWEEN date1 AND date2"
My problem is that I also need to get the rows betwee...
Hi all,
I need to figure out a way to insert a record with a java.util.Date field into a database and i'm stuck.
Does anyone know how i can do this?
Right now i have something like.
java.util.Date myDate = new java.util.Date("01/01/2009");
sb.append("INSERT INTO USERS");
sb.append("(USER_ID, FIRST_NAME, LAST_N...
I have a database table--> date field and the date format is yyyy-mm-dd
if i input in anouther format then field show 0000-00-00
what is the problem and how i can overcome this whereas i have use no form encode method??
...
I've been storing dates in a PostgreSQL 8.3 database table using a query resembling something like this:
INSERT INTO files (date_uploaded) VALUES (now());
According to the documentation there are four formats that PostgreSQL 8.3 will output depending on the setup. My select statement is returning an unknown fifth format:
01:10:00.578...
What do you say about the following Date Function ?
The following code is from a shopping cart.
function va_date( $mask = "", $date = "" )
{
global $months;
global $short_months;
global $weekdays;
global $short_weekdays;
$formated_date = "";
if ( !is_array( $date ) )
{
$date = is_numeric( $date ) ?...
I'm not really sure what to call this. But basically I want to be able to have a user click on "Popular Stories from This Week", and it will take them to a page that will have other stuff but mainly the dates. For example, July 10-17.
I'm currently using this code:
$seven_days_ago = date('j') - 7;
$time_span = date('F ' . $se...
I need to convert a field with milliseconds created by PHP app to a date value. Is there a way to do this using vbcript? or convert to datetime in SQL 2005
Example: 1113192000 to mm/dd/yyyy hh:mm:ss
Thanks,
Sam
...
Please help.
I am trying to figure out how to use DATE or DATETIME for comparison in a linq query.
Example:
If I wanted all Employee names for those who started before today, I would do something like this in SQL:
SQL ------
Select
EmployeeNameColumn
From
EmployeeTable
WHERE StartDateColumn.Date <= GETDATE() //Today
SQL ------
But w...
What is a culture-invariant way of constructing a string such that the Javascript Date() constructor can parse it and create the proper date object?
I have tried these format strings which don't work (using C# to generate the strings):
clientDate.ToString();
// gives: "11/05/2009 17:35:23 +00:00"
clientDate.ToString("MMM' 'dd', 'yyyy'...