ADSM-L

Re: [ADSM-L] Trailing .000000

2015-07-06 05:14:29
Subject: Re: [ADSM-L] Trailing .000000
From: "Loon, EJ van (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 6 Jul 2015 09:12:21 +0000
Hi Grant!
This was exactly what I was looking for. Thank you VERY much!!!
Kind regards,
Eric van Loon
AF/KLM Storage Engineering

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Grant Street
Sent: maandag 6 juli 2015 7:42
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Trailing .000000

try this

select varchar_format (actlog.date_time, 'YYYY-MM-DD HH24:MI:SS') as date_time 
, actlog.nodename as "Nodename", actlog.message as "Message", nodes.node_name, 
nodes.contact from nodes,actlog where nodes.contact like 'Component Team 
Windows%%' and actlog.nodename=nodes.node_name and actlog.originator='CLIENT' 
and actlog.severity <> 'I' and cast(timestampdiff(16, current_timestamp - 
actlog.date_time) as decimal(4,1))<= 2 group by actlog.nodename, 
actlog.date_time, actlog.message, nodes.node_name, nodes.contact order by 
actlog.nodename






On 02/07/15 01:08, Loon, EJ van (ITOPT3) - KLM wrote:
> Hi Kurt!
> Your SQL does indeed return the output I'm looking for, but how dow I embed 
> it in the following SQL statement?
>
> select actlog.date_time, actlog.nodename as "Nodename", actlog.message as 
> "Message", nodes.node_name, nodes.contact from nodes,actlog where 
> nodes.contact like 'Component Team Windows%%' and 
> actlog.nodename=nodes.node_name and actlog.originator='CLIENT' and 
> actlog.severity <> 'I' and cast(timestampdiff(16, current_timestamp - 
> actlog.date_time) as decimal(4,1))<= 2 group by actlog.nodename, 
> actlog.date_time, actlog.message, nodes.node_name, nodes.contact order by 
> actlog.nodename
>
> Again, thanks for your help!
> Kind regards,
> Eric van Loon
> AF/KLM Storage Engineering
>
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of BEYERS Kurt
> Sent: woensdag 1 juli 2015 15:57
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: Trailing .000000
>
> Hi Eric,
>
> It's always fun to play and calculate with timestamps in db2, here is one of 
> the solutions to get the desired format:
>
> tsm: TSMLABO3>select date_time from actlog fetch first 2 rows only
>
>                    DATE_TIME
> ---------------------------
>   2015-03-27 07:06:10.000000
>   2015-03-27 07:06:10.000000
>
> tsm: TSMLABO3>select varchar_format (date_time, 'YYYY-MM-DD HH24:MI:SS') as 
> date_time from actlog fetch first 2 rows only
>
> DATE_TIME: 2015-03-27 07:06:10
> DATE_TIME: 2015-03-27 07:06:10
>
> Regards,
> Kurt
>
> -----Oorspronkelijk bericht-----
> Van: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] Namens 
> Loon, EJ van (ITOPT3) - KLM
> Verzonden: woensdag 1 juli 2015 15:17
> Aan: ADSM-L AT VM.MARIST DOT EDU
> Onderwerp: [ADSM-L] Trailing .000000
>
> Hi guys!
> Now that I have my SQL statement working I noticed that a select date_time 
> from actlog returns the following format:
>
> 2015-06-29 23:27:04.000000
>
> What is the proper way to remove the trailing .000000?
> Again, thanks for your help!!!
> Kind regards,
> Eric van Loon
> AF/KLM Storage Engineering
>
> ********************************************************
> For information, services and offers, please visit our web site: 
> http://www.klm.com. This e-mail and any attachment may contain confidential 
> and privileged material intended for the addressee only. If you are not the 
> addressee, you are notified that no part of the e-mail or any attachment may 
> be disclosed, copied or distributed, and that any other action related to 
> this e-mail or attachment is strictly prohibited, and may be unlawful. If you 
> have received this e-mail by error, please notify the sender immediately by 
> return e-mail, and delete this message.
>
> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
> employees shall not be liable for the incorrect or incomplete transmission of 
> this e-mail or any attachments, nor responsible for any delay in receipt.
> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
> Airlines) is registered in Amstelveen, The Netherlands, with registered 
> number 33014286
> ********************************************************
>
> *** Disclaimer ***
> Vlaamse Radio- en Televisieomroeporganisatie Auguste Reyerslaan 52
> 1043 Brussel
>
> nv van publiek recht
> BTW BE 0244.142.664
> RPR Brussel
> VRT Gebruikersvoorwaarden <http://www.vrt.be/gebruiksvoorwaarden>
> ********************************************************
> For information, services and offers, please visit our web site: 
> http://www.klm.com. This e-mail and any attachment may contain confidential 
> and privileged material intended for the addressee only. If you are not the 
> addressee, you are notified that no part of the e-mail or any attachment may 
> be disclosed, copied or distributed, and that any other action related to 
> this e-mail or attachment is strictly prohibited, and may be unlawful. If you 
> have received this e-mail by error, please notify the sender immediately by 
> return e-mail, and delete this message.
>
> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
> employees shall not be liable for the incorrect or incomplete transmission of 
> this e-mail or any attachments, nor responsible for any delay in receipt.
> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
> Airlines) is registered in Amstelveen, The Netherlands, with registered 
> number 33014286
> ********************************************************
>                       
********************************************************
For information, services and offers, please visit our web site: 
http://www.klm.com. This e-mail and any attachment may contain confidential and 
privileged material intended for the addressee only. If you are not the 
addressee, you are notified that no part of the e-mail or any attachment may be 
disclosed, copied or distributed, and that any other action related to this 
e-mail or attachment is strictly prohibited, and may be unlawful. If you have 
received this e-mail by error, please notify the sender immediately by return 
e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
employees shall not be liable for the incorrect or incomplete transmission of 
this e-mail or any attachments, nor responsible for any delay in receipt. 
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
Airlines) is registered in Amstelveen, The Netherlands, with registered number 
33014286
********************************************************
                        

<Prev in Thread] Current Thread [Next in Thread>