473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with date

when i put record into table in this format
insert into test(boat_id,strartDate) values(2,to_date('2004-01-02
16:00:00','YYYY-MM-DD HH24:MI:SS'));

it is lood ok
but when i try to fet the record out
i see only the date and not the hour

how can i see the hour???/////

thanks Ofer
Jul 19 '05 #1
3 2228
of******@hotmail.com wrote in message news:<56*************************@posting.google.c om>...
when i put record into table in this format
insert into test(boat_id,strartDate) values(2,to_date('2004-01-02
16:00:00','YYYY-MM-DD HH24:MI:SS'));

it is lood ok
but when i try to fet the record out
i see only the date and not the hour

how can i see the hour???/////

thanks Ofer


either by using the to_char function in your select statement
(recommended) or by issuing alter session set nls_date_format =
'YYYY-MM-DD HH24:MI:SS' (not recommended, as now every other system
running your code should run the same alter session command)

Hth

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #2
of******@hotmail.com wrote in message news:<56*************************@posting.google.c om>...
when i put record into table in this format
insert into test(boat_id,strartDate) values(2,to_date('2004-01-02
16:00:00','YYYY-MM-DD HH24:MI:SS'));

it is lood ok
but when i try to fet the record out
i see only the date and not the hour

how can i see the hour???/////

thanks Ofer


Sigh. Not enough information to answer your question.
What does your select look like?
What format do you get for the results of this query?
SELECT SYSDATE FROM DUAL;
Is the hour displayed?

Sorry we cannot be more helpful, but crystal balls are in short
supply, so they are restricted to the military. not that they ever
actually USE them 8^)

Ed
Jul 19 '05 #3
of******@hotmail.com wrote:

when i put record into table in this format
insert into test(boat_id,strartDate) values(2,to_date('2004-01-02
16:00:00','YYYY-MM-DD HH24:MI:SS'));

it is lood ok
but when i try to fet the record out
i see only the date and not the hour

how can i see the hour???/////

thanks Ofer


Why not use a mask, just like you used to put the value in?

If you read the manuals, you will find this is the default behaviour for
date columns.
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Aing | last post by:
Anyone knows what can be cause of this problem? //////////////////////////////////////////////////////////// typedef struct _date_struct { int date,month,year; }date_struct; Class Date {...
3
by: Lyn | last post by:
Hi, I am developing a project in which I am checking for records with overlapping start/end dates. Record dates must not overlap date of birth, date of death, be in the future, and must not...
6
by: jstaggs39 | last post by:
I want to create a Dcount and an If...Then...Else statement to count the number of records in a table based on the date that is entered to run the form. The If....Else statment comes in because if...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
11
by: Geoff Jones | last post by:
Hi I have a table that has a column with Date types. I am trying to view certain rows in the table using a DataView. Using the filter, I can view the rows with, for example, the date equal...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
8
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report...
2
osward
by: osward | last post by:
Hello there, I am using phpnuke 8.0 to build my website, knowing little on php programing. I am assembling a module for my member which is basically cut and paste existing code section of...
7
by: creative1 | last post by:
Hello everyone. I am experiencing a strange problem that I can't fix on my own. I think I need expert's suggestions for this. The problem is: I want to print account statement (or any other...
11
by: jessy | last post by:
Hi, I have a problem with my DateTimePicker javascript code which i downloaded , the problem is when i pick the date and the date appears in my Text Field and i click Submit the date which i picked...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.