unix-timestamp

Grant User One Point Each Day

Using PHP/mySQL, a user is granted a single integer point to their member account each day. The data I will use to determine if a point should be granted are these mysql fields: Creation Date (timestamp) and Last Login (UNIX TIME). The procedure for granting these points is determined when the user logs in. My question is, what's the mo...

Converting unix timestamp string to readable date in Python

I have a string representing a unix timestamp (i.e. "1284101485") in Python, and I'd like to convert it to a readable date. time.strftime returns me with a type error. Any help is appreciated! ...

Unix timestamp in sqlite?

How do you obtain the current timestamp in Sqlite? current_time, current_date, current_timestamp both return formatted dates, instead of a long. sqlite> insert into events (timestamp) values (current_timestamp); sqlite> insert into events (timestamp) values (current_date); sqlite> insert into events (timestamp) values (current_time); sq...

convert unix timestamp php

Hi, I have a database that stores the time for me. I insert it from PHP using date( 'Y-m-d H:i:s'); I then use this function to convert it to a unix timestamp in PHP function convert_datetime($str) { list($date, $time) = explode(' ', $str); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode('...

How to select a period in mysql using the date field as a unix timestamp?

Hello friends, I have a table with a field where I store the date in unix timestamp, eg 1286515961. Need, select the records that are in the month, eg 'October 2010'. I would like to select records directly in mysql query, for speed, but using unix timestamp. Can anyone help me? Thanks already ...

ExtJS - Post date values as Unix timestamp

I use an editorgrid to edit elements from a JsonStore. The JsonStore uses a HttpProxy to update the backend database. My problem is that the backend API expects fromTs and toTs to be Unix timestamps, but when a record is updated, the resulting http post contains a date formatted like this: Wed Oct 20 00:00:00 UTC+0200 2010 I've search...

How to select UNIX date = "2010" in mysql query?

Here is my code so far: SELECT `date`, title, category, url FROM cute_news WHERE category = '4' ORDER BY `date` DESC I want make pages based on the year, like, 2010 , 2009, 2008 and so on. The database saves the date as UNIX_Timestamp. Not sure how to query a recordset with a Year parameter? WHERE unix_timestamp(YEAR) = '2010' or som...

Getting file modification time on UNIX using utime in C.

I have been told by a professor that you can get a file's last modification time by using utime.h. However, the man page seem to cite that utime() only sets this value. How can I look up the last time a file was changed in C on a UNIX system? ...

Sorting through a Database query for all rows created in the same day Unix Timestamp in PHP

Hi, I am developing a PHP application which will handling many company articles. Now I am creating a page which should order articles BY DATE ie all articles created in a certain day are shown with the appropriate heading and so on for all the articles. I have used Unix timestamps to save the dates in the MySql db but I cant find cod...