![]() | |
#11
| |||
| |||
|
|
FeedingFrenzy1... (AT) gmail (DOT) com wrote: Hi all, I am trying to construct a query tool in VB6. This is all i want my query to perform: Select * from table where timestamp_field = Date.text Any help? Thanks, FF Timestamps in oracle are not text - their representation on screen is. Dates are just like that, but have less resolution (1 second for date, 1 nanosecond (10^-9 sec) for a timestamp). Having said that - the representation depends on what format you have defined to show timestamps in. There's always a default, so you'll always see 'something'. Relying on the default format mask is a dangerous thing to do - therefor, always do an explicit conversion: select * from table where timestamp = to_timestamp(date.text,'format_mask'); format_mask is the generic text representation of how your Date.text looks like. Definition of format masks for datetime elements can be found in the SQL Reference manual on tahiti.oracle.com, specifically:http://download.oracle.com/docs/cd/B.../b14200/sql_el... -- Regards, Frank van Bortel Top-posting in UseNet newsgroups is one way to shut me up |
#12
| |||
| |||
|
|
FeedingFrenzy1... (AT) gmail (DOT) com wrote: Hi all, I am trying to construct a query tool in VB6. This is all i want my query to perform: Select * from table where timestamp_field = Date.text Any help? Thanks, FF Timestamps in oracle are not text - their representation on screen is. Dates are just like that, but have less resolution (1 second for date, 1 nanosecond (10^-9 sec) for a timestamp). Having said that - the representation depends on what format you have defined to show timestamps in. There's always a default, so you'll always see 'something'. Relying on the default format mask is a dangerous thing to do - therefor, always do an explicit conversion: select * from table where timestamp = to_timestamp(date.text,'format_mask'); format_mask is the generic text representation of how your Date.text looks like. Definition of format masks for datetime elements can be found in the SQL Reference manual on tahiti.oracle.com, specifically:http://download.oracle.com/docs/cd/B.../b14200/sql_el... -- Regards, Frank van Bortel Top-posting in UseNet newsgroups is one way to shut me up |
#13
| |||
| |||
|
|
FeedingFrenzy1... (AT) gmail (DOT) com wrote: Hi all, I am trying to construct a query tool in VB6. This is all i want my query to perform: Select * from table where timestamp_field = Date.text Any help? Thanks, FF Timestamps in oracle are not text - their representation on screen is. Dates are just like that, but have less resolution (1 second for date, 1 nanosecond (10^-9 sec) for a timestamp). Having said that - the representation depends on what format you have defined to show timestamps in. There's always a default, so you'll always see 'something'. Relying on the default format mask is a dangerous thing to do - therefor, always do an explicit conversion: select * from table where timestamp = to_timestamp(date.text,'format_mask'); format_mask is the generic text representation of how your Date.text looks like. Definition of format masks for datetime elements can be found in the SQL Reference manual on tahiti.oracle.com, specifically:http://download.oracle.com/docs/cd/B.../b14200/sql_el... -- Regards, Frank van Bortel Top-posting in UseNet newsgroups is one way to shut me up |
![]() |
| Thread Tools | |
| Display Modes | |
| |