HOW DO A PROCEDURE TO GET HOUR VALUE FROM DATETIME FIELD?
Posted in 1999
Topics: Stored Procedures & SPL
This is a multi-part message in MIME format. ------=_NextPart_000_000B_01BE3FCB.7D3244F0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Hi, everybody. I have one question: In my table translog, there is a field: datetime year to second. I = want to do a=20 query such as "select phour(transl_datetime),... from translog" . Where = phour(trans_datetime) I want edit a procedure for displaying the filed = transl_datetime't hour value. How can I edit this procedure? Can you = tell me? =20 Wait for your answer. Thanks.=20 ------=_NextPart_000_000B_01BE3FCB.7D3244F0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Dgb2312 http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 face=3DArial size=3D2>Hi, = everybody.</FONT></DIV> <DIV><FONT color=3D#000000 face=3DArial size=3D2> I = have one=20 question:</FONT></DIV> <DIV><FONT color=3D#000000 face=3DArial size=3D2> In = my table=20 translog, there is a field: datetime year to second. I want to do a=20 </FONT></DIV> <DIV><FONT color=3D#000000 face=3DArial size=3D2>query such as = "select=20 phour(transl_datetime),... from translog" . Where=20 phour(trans_datetime) I want edit a procedure for displaying = the=20 filed transl_datetime't hour value. How can I edit this procedure? Can = you tell=20 me?</FONT></DIV> <DIV><FONT color=3D#000000 face=3DArial size=3D2> = </FONT></DIV> <DIV><FONT color=3D#000000 face=3DArial size=3D2> Wait = for your=20 answer. Thanks. </FONT></DIV></BODY></HTML> ------=_NextPart_000_000B_01BE3FCB.7D3244F0--
Try EXTEND(transl_datetime,HOUR TO HOUR). Liu Jiachuan wrote in message <77k5i6$3or$1@news.xmission.com>... > >This is a multi-part message in MIME format. > >------=_NextPart_000_000B_01BE3FCB.7D3244F0 >Content-Type: text/plain; > charset="gb2312" >Content-Transfer-Encoding: quoted-printable > >Hi, everybody. > I have one question: > In my table translog, there is a field: datetime year to second. I = >want to do a=20 >query such as "select phour(transl_datetime),... from translog" . Where = >phour(trans_datetime) I want edit a procedure for displaying the filed = >transl_datetime't hour value. How can I edit this procedure? Can you = >tell me? > =20 > Wait for your answer. Thanks.=20 > >------=_NextPart_000_000B_01BE3FCB.7D3244F0 >Content-Type: text/html; > charset="gb2312" >Content-Transfer-Encoding: quoted-printable > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> ><HTML> ><HEAD> > ><META content=3Dtext/html;charset=3Dgb2312 http-equiv=3DContent-Type> ><META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> ></HEAD> ><BODY bgColor=3D#ffffff> ><DIV><FONT color=3D#000000 face=3DArial size=3D2>Hi, = >everybody.</FONT></DIV> ><DIV><FONT color=3D#000000 face=3DArial size=3D2> I = >have one=20 >question:</FONT></DIV> ><DIV><FONT color=3D#000000 face=3DArial size=3D2> In = >my table=20 >translog, there is a field: datetime year to second. I want to do a=20 ></FONT></DIV> ><DIV><FONT color=3D#000000 face=3DArial size=3D2>query such as = >"select=20 >phour(transl_datetime),... from translog" . Where=20 >phour(trans_datetime) I want edit a procedure for displaying = >the=20 >filed transl_datetime't hour value. How can I edit this procedure? Can = >you tell=20 >me?</FONT></DIV> ><DIV><FONT color=3D#000000 face=3DArial size=3D2> = ></FONT></DIV> ><DIV><FONT color=3D#000000 face=3DArial size=3D2> Wait = >for your=20 >answer. Thanks. </FONT></DIV></BODY></HTML> > >------=_NextPart_000_000B_01BE3FCB.7D3244F0-- >