I am trying to work out if users have had activity in the past hour. The following is my code, but it always returns yes, no matter what:
$houraway = (int)mktime() + (60 * 60);
$now = mktime();
while($user = mysql_fetch_array($qusers)) {
echo $user['Name']." - ";
$datetime = explode(" ", $user['Custom6']);
$date = $dateti...
The below code gives me current time. but it does not tell anything about millisecond
public static String getCurrentTimeStamp() {
SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//dd/MM/yyyy
Date now = new Date();
String strDate = sdfDate.format(now);
return strDate;
}
I get date in th...
I need to come up with a way to unpack a date into a readable format. unfortunately I don't completely understand the original process/code that was used.
Per information that was forwarded to me the date was packed using custom C/Python code as follows;
date = year << 20;
date |= month << 16;
date |= day << 11;
date |= hour <...
I want to save a Date object to a readable string (for example 22/10/2009 21:13:14) that is also parsable back to a Date object.
I have tried many things and the best I could find was to use DateFormater for parsing and formating but it has a setback. When you format a date you lose seconds information. I tried to find if there is an op...
My query is this. I have a bunch of entries and i want to group them by date. But instead of having date in my database, I have a datetime field. What do I do?
select * from follow_queue group by follow_date cast follow_date as date
That's not working.
Thanks!
...
How to select data from mysql table past date to current date? For example, Select data from 1 january 2009 until current date ??
My column "datetime" is in datetime date type. Please help, thanks
Edit:
If let say i want to get day per day data from 1 january 2009, how to write the query? Use count and between function?
...
I've rarely touched PHP date functions,
and now I need to do the follows:
get current date,
get date of three days later
get date of three weeks later
get date of three month later
get date of three years later
and finally to implement such a function:
function dage_generate($number,$unit)
{
}
$unit can be day/week/month/years
...
I need to determine if a set of dates contain two different weeks.
For example:
When returning a set of records from a database that contain a date, there needs to be something to distinguish between the different weeks.
<cfloop query="datesExample">
<cfif DateDiff("d",DateFormat(lastDate),DateFormat(OriginalDate)) GTE 7>
...
How to parse a string of date in an arbitrary specified Oracle date format in C#?
So... the oracle format string is a bit different from the C# datetime format string, so I can't use that format-string as an argument for the parse.
I am using Devart/CoreLab but their OracleDate.Parse seems to be really strange and not working for me. H...
I want to store a date value in a MySQL database.
I have one PHP page called A.php that has 3 inputs: d, m, y, where d = (1 ... 31), m =(1 ... 12) and y = (1970 to 2009).
Now in b.php I collect this values and I need to store in my db.
My DB has a field called dob which is of date type.
How can I construct a variable of type date fro...
I can't seem to locate this on the web anywhere.
What was the date of the first stable release of Tcl v8.5?
Thanks.
...
I have a DATE, how do i write a where that checks for last month until now (either the first of or just todays day -1month).
...
We have a database that stores vehicle's gps position, date, time, vehicle identification, lat, long, speed, etc., every minute.
The following select pulls each vehicle position and info, but the problem is that returns the first record, and I need the last record (current position), based on date (datagps.Fecha) and time (datagps.Hora)...
I would like to write a small script that does the following (and that I can then run using my crontab):
Look into a directory that contains directories whose names are in some date format, e.g. 30-10-09.
Convert the directory name to the date it represents (of course, I could put this information as a string into a file in these direc...
I'm sure there's a good simple elegant one-liner in Ruby to give you the number of days in a given month, accounting for year, such as "February 1997". What is it?
...
Hi,
I am experiencing a very strange behavoiour of Flex Date object. My web service is written in .Net 3.5 and all object which I am retriving or updating have Creation Date (Date Type) in .Net code.
But when I am calling .Net web service and displaying data in Flex, Flex displaying a different Date than what stored in web service. Whe...
Hi,
I am trying to import NetBackup statistics into Oracle. One field I really want is ACTIVE START, but it isn't available from bpdbjobs -report. What is available is ACTIVEELAPSED, so I want to subtract that from the END TIME on import as follows:
END TIME Format: 26/09/2009 10:46:20 PM
ELAPSED TIME Format: 028:32:35 (which is hours...
hi ,
I have a mysql database with a php front end. In my records I have an posted date and an expire date directle access from database. What I need to do is check and see if any records expire date matches posted date,
Something like:
<?php $posted_date= $row_Recordset1['date_posted']; ?>
<?php $exp_date= $row_Recordset1['expire_dat...
I need to get a Date from an SQL Server Database (SQL Server 2000), the date is stored as such:
2009-09-30 00:00:00.000
I want to pass this date into a Classic ASP function to use this date in the Database
somewhere else, however when I get the date, it converts in my ASP code to a locale-dependant version, such as:
30/09/2009
I ju...
I'm creating a small reporting script in Perl CGI. I want to have the start/end date there to filter the events on the report. So now I wonder how to validate the input in some easy, Perl-way.
The way I generate the form with those fields is:
print textfield({-name=>'start_date', -value=>$start_date});
print textfield({-name=>...