Home > database >  ORACLE, a matter of time
ORACLE, a matter of time

Time:10-25

Through process will have A table to store A yyyy - mm - dd HH24: mi: the format of the ss in field B but don't know there is something wrong with the process which block occasionally B save time into yyyy - mm - dd format at the back of the vehicle are not
Hope to be a trigger in the update error but do not know how to judge the time format is yyyy - mm - dd HH24: mi: ss or yyyy - mm - dd

Or have any other way to solve? Process is a lot of uncertainty that so the process will not consider,,,,

Table A

B C D
The 123 00:23:59 2019-01-01 HH
The 124 00:24:59 2019-01-01 SS
The 125 CC error 2019-01-01

CodePudding user response:

Are you sure is wrong, rather than just met '2019-01-01 00:00:00 this date?

CodePudding user response:

Tool shows problems, own good ~ formatting

CodePudding user response:

reference 1st floor xinpingf response:
are you sure is wrong, rather than just met '2019-01-01 00:00:00 the date?



It just needs time

CodePudding user response:

refer to the second floor minsic78 response:
tools show problems, their formatting under good ~


?? I didn't know that is a runtime problem can't formatted

CodePudding user response:

reference 4 floor dingruiaa1 response:
Quote: refer to the second floor minsic78 response:

Under the tool shows problems, own formatting good ~


?? Didn't know I can't formatting ah this is a runtime problem


Date display format is not in itself, or, display can display into all kinds of the way you want it to show, for example, if you want to let him show seconds into a minute, you can then: to_char (' time fields', '- dd yyyy - mm hh24: mi: ss')

CodePudding user response:

reference 5 floor minsic78 reply:
Quote: refer to 4th floor dingruiaa1 response:

Quote: refer to the second floor minsic78 response:

Under the tool shows problems, own formatting good ~


?? Didn't know I can't formatting ah this is a runtime problem


Date display format is not in itself, or, display can display into all kinds of the way you want it to show, for example, if you want to let him show seconds into a minute, you can then: to_char (' time fields', '- dd yyyy - mm hh24: mi: ss')


Not like that is less database to save time

CodePudding user response:

If you are using the date type of data, it actually save values are commonly used to say that is not visible, if visible, then illustrate various means have been formatted, subject placard posted a few rows of data, is in what tools show you?

CodePudding user response:

That is to say, if it is the date type of data, if you will be formatted into: yyyy - mm - dd hh24: mi: ss form, so it shows in the tool for the 2019-06-21 and 2019-06-21 is equivalent to a 00:00:00
If it was stored procedure in time, fewer minutes later, a road, only the investigation process that is the problem that the program logic, not oracle,

CodePudding user response:

'2019-01-01' and '2019-01-01 00:00:00 "is exactly the same,

CodePudding user response:

Oracle's date type take minutes