Ask a Question related to Dreamweaver AppDev, Design and Development.
-
EniGMistA #1
timestamp
Hi,
I have 2 timestamp. How can I retrieve hours, minutes and secont between
them?
--
EniGMistA
EniGMistA Guest
-
backward timestamp
I am using simple record, but it is not recording properly, playback is showing still video, audio is running, at last moments video runs very fast... -
CF DST log files timestamp
I know there is a KB article on this, but the link from the DST KB article doesn't work and searching for it comes up with nothing. Does anyone... -
Querying a timestamp
Hello all, Having a problem querying a timestamp for a date. This is my query: SELECT * FROM accessLog WHERE td = '03/05/05' In the database, td... -
int4 -> unix timestamp -> sql timestamp; abstime?
Hello, what is the opposite of cast(extract('epoch' from now()) as int)? The only thing I found that works is cast(cast(... as abstime) as... -
[PHP] timestamp
This is what I'm using so far. But I need to put in a time stamp to calculate if the visitor is new. I want to use the IP so if the ip saved in MySQL... -
Setec Astronomy #2
Re: timestamp
EniGMistA wrote:
Hi,> I have 2 timestamp. How can I retrieve hours, minutes and secont
> between them?
you mean UNIX timestamp or MySQL timestamp?
In the first case look [url]http://www.php.net/date[/url] , in the second case
loot [url]http://www.php.net/substr[/url]
--
I am what I am, I do what I can
L'uomo, conscio di sbagliare, persevera.
Setec Astronomy Guest
-
EniGMistA #3
Re: timestamp
> In the first case look [url]http://www.php.net/date[/url] , in the second case
I know PHP site. I think that this is a math problem :)> loot [url]http://www.php.net/substr[/url]
--
EniGMistA
EniGMistA Guest
-
Colin McKinnon #4
Re: timestamp
EniGMistA wrote:
something like:> Hi,
> I have 2 timestamp. How can I retrieve hours, minutes and secont between
> them?
>
$totseconds=$t2-$t1;
$sconds=$totseconds % 60;
$hours=(integer)($totseconds/3600);
$minutes=(integer(($totseconds % 3600)/60);
hth
C.
Colin McKinnon Guest
-
EniGMistA #5
Re: timestamp
> $totseconds=$t2-$t1;
Thanks. Olny a mistake:> $sconds=$totseconds % 60;
> $hours=(integer)($totseconds/3600);
> $minutes=(integer(($totseconds % 3600)/60);
$minutes=(integer(($totseconds % 3600)/60); >
$minutes=(integer)(($totseconds % 3600)/60);
--
EniGMistA
EniGMistA Guest
-
ehowman #6
Re: timestamp
Hello - I followed this thread and checked the links provided, but a solution
is not obvious to me. I have a results page with this PHP code that displays
the raw timestamp data <td><?php echo $row_BookOrderList['OrderDate'];
?>&nbsp; </td> I'd like it do display as mm-dd-yyyy. I've figured out how
to display the date, but not to convert the contents of a field just for
display purposes. Any help would be much appreciated. Thanks
ehowman Guest
-
David Powers #7
Re: timestamp
ehowman wrote:
As Micha suggested, you should use MySQL DATE_FORMAT() to extract the> Hello - I followed this thread and checked the links provided, but a solution
> is not obvious to me. I have a results page with this PHP code that displays
> the raw timestamp data <td><?php echo $row_BookOrderList['OrderDate'];
> ?>&nbsp; </td> I'd like it do display as mm-dd-yyyy. I've figured out how
> to display the date, but not to convert the contents of a field just for
> display purposes. Any help would be much appreciated. Thanks
date from the database. That way it will be already formatted the way
you want it.
In your SQL query, instead of OrderDate, use the following:
DATE_FORMAT(OrderDate, '%m-%d-%Y')
If you are using the Simple mode in the Recordset dialog box, click the
Advanced button. That will display your SQL query fully written out.
Simply alter "OrderDate" as shown above. That's all there is to it.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest
-
ehowman #8
Re: timestamp
Thank you for the very fast reply, you solved it! I was using the code in the wrong place and was missing a bit of the syntax.
Thank you for your time and effort.
Eric
ehowman Guest
-
David Powers #9
Re: timestamp
ehowman wrote:
Glad to have been of help. The date and time functions in MySQL can be a> Thank you for the very fast reply, you solved it! I was using the code in the wrong place and was missing a bit of the syntax.
>
> Thank you for your time and effort.
little difficult to get your head around to begin with, but they're very
useful.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest



Reply With Quote

