473,468 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Convert character to date

1 New Member
how to convert character to date. writetime is character data type.
i want to have CPU utilization of last 24 hrs. for time being i want to have result from 1 server.


select "AVG_%_Total_Processor_Time", "WRITETIME", "MAX_%_Total_Processor_Time", "MIN_%_Total_Processor_Time", "AVG_%_Total_Privileged_Time" , "AVG_%_Total_User_Time", "AVG_Context_Switches/Sec", "AVG_Total_Interrupts/Sec"
from "NT_System_HV"

where "Server_Name" = 'Primary:ITM6VM:NT' and "WRITETIME" between '0000000000000000' and'9999999999999999'

query working fine till where server name but i am confuse how to utilize and get result from between clause and get last 24 hrs result.



i want this query for BIRT report design and itm6.2.
Jun 20 '08 #1
2 3983
docdiesel
297 Recognized Expert Contributor
Hi,

if you can't change the WRITETIME column to integer, then try to add a generated column which automatically gets set as converted integer value of WRITETIME:

Expand|Select|Wrap|Line Numbers
  1. alter table NT_System_HV
  2.   add column  WRITETIME_INT
  3.   GENERATED ALWAYS AS ( int(WRITETIME) )  ;
and modify your SELECT statement:

Expand|Select|Wrap|Line Numbers
  1. ... and "WRITETIME_INT"
  2.   between 0 and 9999999999999999
Regards,

Bernd
Jun 24 '08 #2
niladri123
8 New Member
select date(19-1-08) from sysibm.sysdummy1
Jul 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Loi Tan Vo | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be imported, I want to convert the date column to date type. For...
11
by: jguilford | last post by:
I have created a SQL Stored Procedure that uses a Case statement to determine the Order By. For one of the Case statements I am trying to turn a Char field into Datetime in for the Order By,...
2
by: ggnanaraj | last post by:
In AS/400, have a table that has a character field defined. This has to be converted to date format of YYYY-MM-DD. The sample character data is as follows: 02/05/2005. In UDB, you can do a...
7
by: Nimmy | last post by:
Hi, I have a file which has different dates, I want to scanf them as CHAR and convert them to DATE format, how can I do this? Thanks
14
by: Me | last post by:
Hi all I am getting a really bizzare error on when I convert a string into a datetime: The code is : DateTime dt1 = Convert.ToDateTime("10 Sep 2005"); Console.WriteLine(dt1.Year);
1
by: izziy | last post by:
Our legacy DB has a bad column which stores a date value as char(8), it has a format like 'MMDDYYYY'. I am creating a report to report this particular date and also use this date to specify a...
0
by: tbrmc | last post by:
Hi frnds, Could anybody tell me how to convert date in character type field into particular date format
1
by: rdraider | last post by:
I can't seem to find a way to convert an INT type in the form of YYYYMMDD to an actual date form of mm/dd/yyyy Can anyone pointt me in the right direction? Thanks
2
by: cpeters | last post by:
I have a file that I need to import into a DB2400 table. One of the columns is a character string that is really a date in yyyymmdd format (ex. 20080520). How can I convert this into a date? Is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.