timediff hours and days

------=_NextPart_000_0013_01CC1A07.34D99630
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0014_01CC1A07.34D99630"


------=_NextPart_001_0014_01CC1A07.34D99630
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello! Have this anwer from mysql,

+----------------------------------------+

| TIMEDIFF(Date,now()) |

-+----------------------------------------+

| 70:56:06 |

+----------------------------------------+



Is it possible to convert it to -> days, hour, minutes?



Thanks!



Roc=EDo G=F3mez Escribano

<mailto:r.sanchez [at] ingenia-soluciones.com> =
r.gomez [at] ingenia-soluciones.com



Descripci=F3n: cid:image002.jpg [at] 01CB8CB6.ADEBA830

Pol=EDgono Campollano C/F, n=BA21T

02007 Albacete (Espa=F1a)

Tlf:967-504-513 Fax: 967-504-513

www.ingenia-soluciones.com




------=_NextPart_001_0014_01CC1A07.34D99630
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"><meta name=3DGenerator content=3D"Microsoft Word =
12 (filtered medium)"><!--[if !mso]><style>v\:* =
{behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texto de globo Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.TextodegloboCar
{mso-style-name:"Texto de globo Car";
mso-style-priority:99;
mso-style-link:"Texto de globo";
font-family:"Tahoma","sans-serif";}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DES link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US>Hello! Have this anwer from mysql, <o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US>+----------------------------------------+<o:p></o:p></span>=
</p><p class=3DMsoNormal><span =
lang=3DEN-US>|=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= A0=A0=A0=A0 =
=A0TIMEDIFF(Date,now()) |<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US>-+----------------------------------------+<o:p></o:p></span=
></p><p class=3DMsoNormal><span lang=3DEN-US>| 70:56:06 =
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0|<o:=
p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>+----------------------------------------+<o:p></o:p></span>=
</p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Is it possible to convert it to -> days, hour, =
minutes?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Thanks!<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><b><span =
lang=3DES-PE style=3D'font-size:10.0pt;color:#0070C0'>Roc=EDo G=F3mez =
Escribano<o:p></o:p></span></b></p><p class=3DMsoNormal><span =
lang=3DES-PE style=3D'font-size:10.0pt;color:#9D9D9D'><a =
href=3D"mailto:r.sanchez [at] ingenia-soluciones.com"><span =
style=3D'color:blue'>r.gomez [at] ingenia-soluciones.com</span></a><o:p></o:p>=
</span></p><p class=3DMsoNormal><span =
style=3D'color:blue'><o:p> </o:p></span></p><p =
class=3DMsoNormal><span style=3D'font-size:9.0pt;color:#9D9D9D'><img =
border=3D0 width=3D181 height=3D74 id=3D"Imagen_x0020_1" =
src=3D"cid:image001.jpg [at] 01CC1A07.286E43F0" alt=3D"Descripci=F3n: =
cid:image002.jpg [at] 01CB8CB6.ADEBA830"></span><span =
style=3D'font-size:12.0pt;color:blue'><o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:10.0pt;color:#A6A6A6'>Pol=EDgono Campollano C/F, =
n=BA21T</span><span =
style=3D'font-size:10.0pt;color:blue'><o:p></o:p></span></p><p =
class=3DMsoNormal><span style=3D'font-size:10.0pt;color:#9D9D9D'>02007 =
Albacete (Espa=F1a)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-GB =
style=3D'font-size:10.0pt;color:#9D9D9D'>Tlf:967-504-513  Fax: =
967-504-513<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;color:#A6A6A6'><a =
href=3D"www.ingenia-soluciones.com" =
title=3D"blocked::www.ingenia-soluciones.com"><span lang=3DEN-GB =
style=3D'color:#9D9D9D'>www.ingenia-soluciones.com</span></a></span><span=
lang=3DEN-GB =
style=3D'font-size:10.0pt;color:#A6A6A6'><o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p></div></body></html>
------=_NextPart_001_0014_01CC1A07.34D99630--

------=_NextPart_000_0013_01CC1A07.34D99630--
Rocio Gomez Escribano [ Di, 24 Mai 2011 11:39 ] [ ID #2059968 ]

Re: timediff hours and days

--=_09e6b257-97eb-49c7-8200-61baa698d9ef
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

----- Original Message -----

> From: "Rocio Gomez Escribano" <r.gomez [at] ingenia-soluciones.com>

> Hello! Have this anwer from mysql,
> +----------------------------------------+
> | TIMEDIFF(Date,now()) |
> -+----------------------------------------+
> | 70:56:06 |
> +----------------------------------------+

> Is it possible to convert it to -> days, hour, minutes?
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functio ns.html#function_date-format can give you that in a single string; on the same page there's other stuff that allows you do do it into separate fields if you prefer.

I sometimes feel the documentation is the best part about MySQL :-p

--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--=_09e6b257-97eb-49c7-8200-61baa698d9ef--
Johan De Meersman [ Di, 24 Mai 2011 12:32 ] [ ID #2059969 ]
Datenbanken » gmane.comp.db.mysql.general » timediff hours and days

Vorheriges Thema: MySQL Datadir under rhel6
Nächstes Thema: FW: MySQL shell...with parameters