How can i get the datatype datetime from sql into my netcobol.
I don't want to convert it to often this because of performance.
Could someone show me an example.
When you say "I don't want to convert it to often this because of performance". Unless your computer was made over 20 years ago, I don't see how moving around a few bytes (if that) would stress your machine.
You can insert or retrieve datetime values in any number of formats by specifying the attributes of DATETIME. To retrieve datetime values, declare a host variable the same length as the number of bytes you expect to store in the variable. See your SQL manuals for the required number of digits for DATE, TIME, or TIMESTAMP values. The lengths of the target variables for TIME and TIMESTAMP values depend on the precision (the number of digits in the fractional seconds).
I did not provide any examples previously because many people have trouble understanding the nuances of DATETIME data types. If you don't know anything about DATETIME or SQL in general, your most helpful tip is to read the book first. Giving you 1 DATETIME example here is not going to begin to explain the half of it. Show us what you know so far about SQL or DATETIME: this will help focus our answers in the most helpful way. For example, does the following make any sense to you? DATETIME ’2000-03’ YEAR TO MONTH.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.