.  

 

 

.
.

25 / 02 / 2017

Usuarios conectados: 2

Cargando documento...

Buscar:

.

Este Sitio:

Principal

Dreamweaver

Fireworks

JavaScript

CSS

Sonido

Artículos

Links

E-ufemismos

Descargas

Historial

 

Mailing List:

Suscríbete a la lista de correo, No practico spamming y ofrece algunas ventajas.

Pulsa aquí para saber más y suscribirte.

 

Recomendados:

Tecnorama >Dreamweaver Extensions

 

PHP Elapsed Time

Versión para imprimir | Translate this page

This extension calculates the time between two Unix Timestamp dates and give the result in a "human readable" format (years, months, days, hours and minutes). As an example, it can be useful to display the time passed since last login -if you stored it in a cookie or into your database-.

How to use it

1.- Open "Server Behaviors->Tecnorama->Elapsed Time"

2.- In the menu: Check/uncheck the "hours" and "minutes" checkboxes if you want to display them when using the extension: If you uncheck them, you will have something like "3 years, 1 month and 2 days". If you check them, it could be: "3 years, 1 month, 2 days, 20 hours and 15 minutes".
In the textfields, you should indicate where the dates come from. time() function has been left in one of them by default, so you can check the time between one of your fields and current date. However, you can select another field, if you want to. 

 

 

 

3.- To select the fields: click the  button to open the panel where you can select your fields. Remember that you don't have to use the "format" and "code" textfields, as they are useless here.

 

 

 

 

 

 

4.- It's done: Here you can see the extension working in live data view. For this example I used an URL parameter and current date -I left time() in Field 2-.
Just one more thing: dates don't need to be in a certain order (for example, current date in Field 2). The code will check it.

Remember to read this tutorial about displaying MySQL timestamps as Unix timestamps.

 

You can download the extension here.

Comments? 12, so far. Displaying 1 ->5

1.- As Charlie Sheen says, this article is "WIGNINN!" http://eblijb.com [url=http://pxopjjbyao.com]pxopjjbyao[/url] [link=http://jgtmqjr.com]jgtmqjr[/link]

2.- Finindg this post has solved my problem

3.- This was so helpful and easy! Do you have any arictles on rehab? http://bpeanejmt.com [url=http://mmmooycca.com]mmmooycca[/url] [link=http://lrgnitkrd.com]lrgnitkrd[/link]

4.- Good point. I hadn't thohgut about it quite that way. :)

5.- That's really thinking at an imsirspeve level

« Previous | 1 - 5 | 6 - 10 | 11 - 12 | Next »

Add your Comments



Escribe el código de la imagen superior:

:

TECNORAMA es simplemente una página personal. No sirve ni de promoción del autor ni cosas por el estilo.
Todos los códigos, textos y tutoriales son de libre uso mientras se mencione al autor (no es mucho pedir)
Este sitio es compatible con IE6/NS6/Mozilla1.0
Para contactar, puedes enviarme un e-mail a tecnorama@hotmail.com