Oracle and asp.....still cannot figure this out.

C

clinttoris

Turkbear said:
Shouldn't it be:
CurDate= Now()
ssqlCheckBox = "INSERT INTO
Survey_User_Answer(Survey_Id,Question_Id,Answer_Id,Date_Answer,
user_Id) VALUES (" & SurveyID & ",'" & objRS("Question_Id") & "', '" &
answerChoices(answerChoice) & "', to_date('" & CurDate & "','dd/mm/yyyy hh:mi:ss PM'), " & user & ")"


Now, please show the output you get with a

Select to_char(Date_Answer,'dd/mm/yyyy hh:mi:ss PM') from Survey_User_Answer;

in SqlPlus

Sorry Turkbear,

You are correct in the syntax. I was trying to get it to work and when
I sent you the syntax I incorrectly sent you the wrong thing. Anyways,
here is the output with the above select that you mentioned

19/06/2006 01:55:25 PM
 
T

Turkbear

Sorry Turkbear,

You are correct in the syntax. I was trying to get it to work and when
I sent you the syntax I incorrectly sent you the wrong thing. Anyways,
here is the output with the above select that you mentioned

19/06/2006 01:55:25 PM

That looks correct, is it not?

The entire dateTime values are being stored and returned..
 
C

clinttoris

Turkbear said:
That looks correct, is it not?

The entire dateTime values are being stored and returned..


Hmmm I see. Does Oracle not store the time values or do you only see
this when you do a to_char? I guess that is where I am having the
issues. I am used to Datetime in Sql Server and actually see the whole
datetime as opposed to only seeing a date and then do a to_char on that
date. I apologize then, it is working I was just confused with how
oracle treats and stores the value.
 
T

Turkbear

Hmmm I see. Does Oracle not store the time values or do you only see
this when you do a to_char? I guess that is where I am having the
issues. I am used to Datetime in Sql Server and actually see the whole
datetime as opposed to only seeing a date and then do a to_char on that
date. I apologize then, it is working I was just confused with how
oracle treats and stores the value.


Right..as I stated before, Oracle, unless 'asked to by the to_char function' will not show the time component, even
though it is stored in the database - Do not confuse what the DISPLAY format is with how it is actually stored ( it is
really stored as a compound number that gets translated according to the mask requested for display - the system
default is DD-MON-YY )

This can be very, very confusing to newcomers to Oracle and there is absolutely no need to apologise....


Select sysdate from dual;
19-JUN-06

Select to_char(sysdate,'mm/dd/yyyy hh:mi:ss AM') from dual;
06/19/2006 02:14:37 PM
 
C

clinttoris

Turkbear said:
Right..as I stated before, Oracle, unless 'asked to by the to_char function' will not show the time component, even
though it is stored in the database - Do not confuse what the DISPLAY format is with how it is actually stored ( it is
really stored as a compound number that gets translated according to the mask requested for display - the system
default is DD-MON-YY )

This can be very, very confusing to newcomers to Oracle and there is absolutely no need to apologise....


Select sysdate from dual;
19-JUN-06

Select to_char(sysdate,'mm/dd/yyyy hh:mi:ss AM') from dual;
06/19/2006 02:14:37 PM

This is perfect Turkbear. Really appreciate all your help and
everyone's help on this. This really clarified a lot for me. Have a
great day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top