Oracle 10g Database Standard (ODBSEONUPP0) Logo

Related Topics:

Anonymous Posted on Sep 04, 2008

Oracle date problem

I have an Oracle date problem I want to use in the where also a time filter not just a date filter, how do I add it?

select count(*)
from table
where DTTM > '10-Jun-08';

Thank you.

1 Answer

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Nov 28, 2008
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Nov 28, 2008
Answers
1
Questions
0
Helped
769
Points
2

All dates are actually date-time fields - if you don't specify the time, Oracle defaults to midnight. To filter date-time specify the date-time string as a formatted field like this:

select count(*) from mytable where dttm > to_date('20080610181907','YYYYMMDDHH24MISS');

This is the date June 10, 2008 at 6:19:07 PM as an example.

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1helpful
2answers

How do i change the time and date on my Sansung GT-B5722, it is set on the 01 01 2009?

you may wanna try this:

Create and view world clocks Learn to view the time in another region and set world clocks to appear on your display.
Create a world clock
1. In Menu mode, select World clock.
2. Select Add.
3. Scroll left or right to a time zone.
4. To set daylight saving time, select 1.htm92.gif.
5. Select Add to create your world clock.
6. To add more world clocks, repeat steps 2-5 above.
Add a world clock to your display
With the dual clock widget, you can view clocks with two different time zones on your display.
After you have created world clocks,
1. In Menu mode, select World clock.
2. Select the world clock you want to add and select More → Set as 2nd clock.
0helpful
1answer

I originally istall oracle 10g in my d drive now

you can uninstall by using settings > control panel > add/remove programms and select 1og otherwise have CCleaner software to remove 10g
9helpful
3answers

Transforming birthdates into year codes

Here is a solution that might work for you. Please be mindful that there are several different solutions that will achieve the same thing in Excel (I am assuming Excel is your software).

1) Make sure each column in your spreadsheet has a heading.

2) Highlight (select) the column of birthdays.

3) Choose Format from the menu bar.

4) Choose Cells... from the drop-down menu.

5) For the "category", choose Custom.

6) In the "type" box, type yyyy

7) Click OK and when you return to your spreadsheet, you will see only the years displayed. However, when you try to edit a cell, you will see that the entire birth date is stored and preserved.

8) Now, highlight the entire table

9) Then, choose Data from the menu bar

10) Choose Subtotals... from the drop-down menu

11) In the "At each change in" box, choose the name of the column with the birth dates

12) In the "Use function" box, choose Count

13) Leave all other choices at their defaults

14) Click OK, and you are done.

Using this method, you can continue to enter the data as you always have. In that way, the birth date info is never actually destroyed or converted. What you are doing is simply deciding what is displayed.

I hope this helps.
0helpful
1answer

In excel how to display date in previous cell, a hyphen, and the end of that month

I'm not sure exactly what you mean, but you can highlight the cell that you want, right click, select "format cells", select "date" in the "numbers" tab and scroll through a bunch of different options for displaying the date.
0helpful
1answer

I have a column A with repetitive dates. Column B with repetitive names Example: 05/01/09 a 05/02/09 b 05/03/09 a 05/01/09 c 05/04/09 a 05/01/09 d 05/03/09 c I want to count how many a,b,c,... I have for...

Use 3 pivot tables, put a, b, and c in the row areas and "Count of a", "Count of b" and "Count of c" in the data sections. That will give you a count of each date for each column
0helpful
1answer

Linking tables in Oracle

While I'm not saying it's not possible, it's not something Oracle (Or any relational database) is designed to support, so don't be surprised if this isn't possible or extremely difficult.

Relational databases support predictable relationships. IE: Table 1 relates to Table 2 in a given way.

Relational databases do not support varied relationships depending on the data in each row. The query engines simply can not join data this way.

If you provide me more details about your data, I might be able to propose a table structure that doesn't require a different table for each row of data in ROOT.
0helpful
1answer

How to print only selected fields in ms access.

open your table in query, follow steps to do this...

1. open new query in access
2. locate the table
3. once table selected, select field name in selected table you only want to include in query
3. once finished selecting the field save the query
4. you can now view selected field in your table and print as well
5. you can edit the query anytime if you want to add or remove field
6. query will not affect your table since this is only query.

hope this will help you....
0helpful
1answer

Microsoft Access Query

Your date form is what it wrong. In order to use dates in Access with a BETWEEN function clause the values have to specifically be dates.

You can create dates in literal strings using the # sign to bound them, as in:

Select DISTINCT [ActivityDate] between #1/1/08# and #12/31/08#

#....# tells Access to treat this literal string as a date.

If you are using non-literal values, such as a parameter handed into the query, which would then be a variable, you can't use #some_variable# to cause Access to view it as a Date since #...# is for literal values only. To convert (also called "casting" a variable), use the CDate function. CDate likes to know what format to expect the string to come in though so it helps to pass that along, as in:

Select DISTINCT [ActivityDate] between CDate(begin_dt_string) and CDate(end_dt_string)

Remember the date string you pass into CDate has to be readable as a date by CDate. So make sure you pass in something that it can handle (use the IsDate() function to check to be sure so you can avoid a runtime datatype casting error). If your locale is US, then passing in x/y/z it will take for MM/DD/YYYY. If Europe, it will take it as DD/MM/YYYY. So keep that in mind.

To convert out of a date, use the FORMAT() function. That is how you get a date data type value to become a string value.

More fun reading:
http://www.techonthenet.com/access/functions/datatype/cdate.php
http://www.techonthenet.com/access/functions/advanced/isdate.php
http://www.techonthenet.com/access/functions/date/format.php

Hope this helps!
Not finding what you are looking for?

779 views

Ask a Question

Usually answered in minutes!

Top Oracle Computers & Internet Experts

ADMIN Andrew
ADMIN Andrew

Level 3 Expert

66855 Answers

Bonded Repair

Level 3 Expert

407 Answers

ADMIN Eric
ADMIN Eric

Level 3 Expert

39363 Answers

Are you an Oracle Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...