Date field - Hourly report

Hello All,
If I have a table 'TMP_LOGING' with a date column 'Created' and a number column 'LOGINS', how can I pull hourly logins from these table?
Thanks!

Hi,
If you pass a 2nd argument to TRUNC (dt), it (basically) returns the DATE that is like dt as far as the 2nd argument specifies, but with all the smaller time divisions set to their lowest possible values.
SELECT        TRUNC (created, 'HH')     AS hour
,        COUNT (*)                  AS total_logins
FROM        tmp_loging
GROUP BY   TRUNC (created, 'HH')     
ORDER BY   TRUNC (created, 'HH')     
;If created is
June 18, 2010 14:09:48, then TRUNC (created, 'HH') returns
June 18, 2010 14:00:00.
That is, since the 2nd argument was the format specifier for hours, the hour of the two DATEs, and all the larger time divisions (day, mont, and year) are the same, but the smaller time divisions (minute, second) of the value returned are as low as they can possibly be.
Edited by: Frank Kulash on Jun 18, 2010 2:04 PM
Added explanation.

Similar Messages

  • Discoverer 2000 : Problem in sorting date field on report

    Hello,
    I am not able to sort on date field on report
    it is giving error as
    ( illegal operation).

    Thanks Savitha.
    I found one more way of making that code work, just want to share this.
    If we add the following statement, the same code works without having to add the time part along with date.
    "DBMS_XMLSave.setdateformat(updctx, 'yyyy-MM-dd');"
    note the format is case sensitive. Instead of MM, if you give 'mm' it won't work, it uses java format.

  • Date field in Reporting

    Hello all ,
    We need to display the Start date and the End date along with the time taken to complete the project in a report. I have created a measure called date and the type is a text field. I was able to load data into the date field. But , I am unable to bring the date field into the report. There is a error which is coming. Is it possible to display the date field in the report / KPI ?
    Thanks
    Vijay

    Hi Ricardo ,
    I am trying out both the methods. My client is a infrastructure company. It has a number of projects . The client wants to monitor the performance of each of his projects and the overall Delay.  My requirement is to display a report which has the actual start date , planned start date , actual end date , planned end date , actual , budget and delay.
    I tried to load the date fields into the PAS as a text field. The data load was successful. But when designing the report , I am getting an error. Is it a problem related to text variables ? Is it possible to bring the text variables onto the UI ?
    Is there a way to build a report on the data from initiatives in SSM ? Do we need another reporting toll to achieve the same ?
    Thanks
    Vijay

  • How to place a sign like '.'  in front of a data field in report builder ?

    Hello Everybody,
    In the presentation of datas in my report , I must list the sub-elemnst of a group by plcaing a ' *.* ' in front of each one. Like
    Persons
    *.* Jean Fontaine
    *.* François David
    *.* Serena Joyau
    How must I process to do it ?
    Helps.
    Regardly.

    Thanks Vikas.
    I do it as
    SELECT ALL '.' || V_PRESTATAIRE_MALADIE.NOMBENEF, V_PRESTATAIRE_MALADIE.ADREBENE,
    V_PRESTATAIRE_MALADIE.TELEBENE, V_PRESTATAIRE_MALADIE.LIBDETLI
    FROM V_PRESTATAIRE_MALADIE
    But in the field 'NOMBENEF' , more data does not appear. And too when I want to increase the lenght of the signal '.' or put it(the signal) in bold face , I have not possibility.
    There has not other mean do realize it ?

  • Hyperlink on data field crystal report vs 2005

    Please help!!!!
    I can not set the hyperlink on a data field in *.rpt.
    I also set the hyperlink type was A website on internet and filled the website address. But when report display i can not see any link.
    Thanks in advanges,

    Hello,
    (from CR Help file)
    You can select a report object on the Design or Preview tab and create a hyperlink to another location.
    The hyperlink is saved with your report and is available to other users as a way of viewing additional information.
    Note:    Crystal Reports also lets you create hyperlinks with Relative URLs, so your web reports retain independence from their location on any particular server.
    To create a hyperlink field
    Select a report object on the Design or Preview tab.
    On the Format menu, click Hyperlink.
    The Format Editor dialog box appears with the Hyperlink tab active.
    Click the type of hyperlink you want to create.
    The available types in the upper area are:
    No Hyperlink
    This is the default option. There is no hyperlink associated with the selected report object.
    A Website on the Internet
    Select this option if you want your report object to be linked to a static web address. Use the formula button to create a URL based on a field value. For example, you might enter the following formula if your Customer Name field contained information that would create a series of meaningful URLs:
    "http://www." + {Customer.Customer Name} + ".com"
    Note:    You can also use this option to connect to Business Objects, Web Intelligence, and OLAP Intelligence documents (this is also known as report linking). Use the openDocument function to create these hyperlinks in Crystal Reports.
    Current Website Field Value
    Select this option if you want the program to create a hyperlink out of the field you selected. The field must be stored as a proper hyperlink in your data source.
    An E-mail Address
    Select this option if you want to create a "mailto" address from the field you selected. Use the formula button to create an address based on a field value.
    A File
    Select this option to create a hyperlink to a file on a specific computer or networked computer. Use the formula button to create a file path based on a field value.
    You can also use a hyperlink of this type to run an EXE with a command-line parameter. Enter the path and application name, and follow it by the parameter for the command.
    Current E-mail Field Value
    Select this option if you want the program to create an email hyperlink out of the field you selected. The field must be stored as a proper email address in your data source.
    The available types in the DHTML Viewer Only area are:
    Report Part Drilldown
    For information about how to use this option, see The Report Part Drilldown option.
    Another Report Object
    For information about how to use this option, see The Another Report Object option.
    Note:    Not all hyperlink types are available at all times. The object you select and its location on the report determine which types are available.
    After you have chosen a hyperlink type, enter the appropriate hyperlink information (the URL of a web site, for example).
    Click OK when you are finished.
    The hyperlink is inserted as appropriate. Click it on the report to go to the web site, to send an e-mail, and so on.

  • Posting date field in reports S_SMC_47000016 / S_SMC_47000017

    Hi all,
    We are using the serice desk function for monitoring the support tickets. I have one quert related to List of notification transactions S_SMC_47000016 / S_SMC_47000017.
    In the service desk whenever we run the report of all open notificaitons (S_SMC_47000017)  Or Find Support Notifications (S_SMC_47000016), in the list output we do not get any data in the field "Posting Date".  We do get the date in field "Valid From", but no information is getting populated in posting Date column.
    If we try to search the notifications using the T Code " CRMD_ORDER" and try to get the list of notifications in the find Tab, then here the posting date gets populated.
    Could you please let me know if  there is any setting which is preventing from Posting Date to be populated in the T Codes S_SMC_47000016 / S_SMC_47000017.
    Thanks and Regards,
    Narendra

    Hi,
    We have chnaged the layout already, my question is that in the layout the posting date column is appearing, but the posting date is not getting updated for any notification in the output. The column remains blank.
    Thanks and Regards,
    Narendra

  • Data field in Report Designer

    Hi Experts,
    I am trying to create a report. I have used a query as data provider. I was wondering if I can use formulas(adding, multiplying...) in report designer as user wants to see calculated values in the report. Could you please let me know how to achieve that in Report designer as I have noticed that all cells are identified as texts.
    Many thanks in advance
    Regards
    Shanthi

    Hi Vachan,
    this is where i am confused. So you are saying that I can not do any manupulations(like dividing a value by 1000) in Report Designer then??
    Just to be clear,
    Say in Excel, while formatting, we can perform functions using one cell referrence in another. cell2=cell1*1000 where as cell1 is part of the query result and cell 2 is calculated after cell1 does.
    Regards
    Shanthi.
    null

  • Chart report Condition fields and Data fields

    Hi all,
    i have tried chart report by adding two condion fields and one data field, the report is more meaning full in this scenario. the first condition field is taken as x-axis, the 2nd condition fields is taken as legend.
    while adding more condition fields and data fields, i feel its not showing meaningfull data.
    can anyone explain how the condition fields and data fileds are manipulated by crystal report.
    i am using CR XI R2 Server.
    Thanks
    Padmanaban V

    i am using Crystal Report XI R2 RAS Embedded in my server.
    as we can add any number condition fields programatically using the method
    ConditionField.Add(FieldObj), i would like to know how these fields are manipulated internally by the RAS server.
    that means, what is the significance of condition fieldobject 1, condition fieldobject 2,condition fieldobject 3 etc...
    if i add more than two condition fields , RAS Chart Report always returns 0 as legend value for all legends.
    Thanks in advance
    Regards,
    Padmanaban V
    Edited by: Padmanaban Viswanathan on Dec 22, 2008 9:53 AM

  • System date format in reports (winnt)

    Hello All,
    I am using oracle report bulder 6.0.5.35. on winnt
    i have to show all the date fields in my report in the system format (as specified in the regional settings in control panel)
    i couldn't find a direct solution, so what i did was to create a user defined parameter and pass the system date format as a string to the report at runtime (this report is invoked from VC++, so i can pass the local setting as a string at runtime)
    after this, in BEFORE REPORT trigger i use the following code
    dbms_session.set_nls('nls_date_format',:dat);
    --where dat is the user parameter.
    shouldn't this change the date format for the current session. but this is not happening. (i have not set date formats for any date fields in report)
    i am not getting the output in format that i passed, but always i am getting in 'dd-mon-yy' format.
    can anybody please help. is there any other solution.
    thanks and regards,
    Pinto.
    null

    hello,
    the DBMS_SESSION changes the settings on the database side. as reports has it's own client-side NLS settings this does not have any influence on the output.
    the client-side settings are defined by the NLS_LANG settings in the registry on the client.
    regards,
    the oracle reports team

  • Mandatory field in report

    Hi,
    I have a date field on report.
    Now this needs to be mandatory and report should be run in batch mode with a variant.
    Also when the report is run the first time the date should not be taken from the selection screen input but from TVARV, this is fine, logic can be written for this.
    However since date is a mandatory field and the only way to check whether user input or TVARV needs to be selected is the FIRST ot the subsequesnt runs of the report.
    How to find out if the report has run first time, it is being scheduled as a batch job with a variant.

    Hello,
    As you want to make the DATE field in your report as mandatory and will be picking up the last run date (DATE) from the same table whenever your run the table then while you are fetching the date from TVARV table , for the first time as there is no data stored in TVARV table for your program your query will fail. In this case i.e. sy-subrc = 4, please create a enrty in the same table.
    I am assuming that you will be updating the DATE (last run date) in TVARV table everytime after the successfull execution of the program.
    Hope it helps.
    Thanks,
    Jayant.

  • Problems While Extracting Hours From Date Field

    Hi Guys,
    Hope you are doing well.
    I am facing some problems while extracting hours from date field. Below is an example of my orders table:-
    select * from orders;
    Order_NO     Arrival Time               Product Name
    1          20-NOV-10 10:10:00 AM          Desktop
    2          21-NOV-10 17:26:34 PM          Laptop
    3          22-JAN-11 08:10:00 AM          Printer
    Earlier there was a requirement that daily how many orders are taking place in the order's table, In that I used to write a query
    arrival_time>=trunc((sysdate-1),'DD')
    and arrival_time<trunc((sysdate),'DD')
    The above query gives me yesterday how many orders have been taken place.
    Now I have new requirement to generate a report on every 4 hours how many orders will take place. For an example if current time is 8.00 AM IST then the query should fetch from 4.00 AM till 8 AM how many orders taken place. The report will run next at 12.00 PM IST which will give me order took place from 8.00 AM till 12.00 PM.
    The report will run at every 4 hours a day and generate report of orders taken place of last 4 hours. I have a scheduler which will run this query every hours, but how to make the query understand to fetch order details which arrived last 4 hours. I am not able to achieve this using trunc.
    Can you please assist me how to make this happen. I have checked "Extract" also but I am not satisfied.
    Please help.
    Thanks In Advance
    Arijit

    you may try something like
    with testdata as (
      select sysdate - level/24 t from dual
      connect by level <11
    select
      to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') s
    , to_char(t, 'DD-MM-YYYY HH24:MI:SS') t from testdata
    where
    t >= trunc(sysdate, 'HH') - numtodsinterval(4, 'HOUR')
    S     T
    19-06-2012 16:08:21     19-06-2012 15:08:21
    19-06-2012 16:08:21     19-06-2012 14:08:21
    19-06-2012 16:08:21     19-06-2012 13:08:21
    19-06-2012 16:08:21     19-06-2012 12:08:21trunc ( ,'HH') truncates the minutes and seconds from the date.
    Extract hour works only on timestamps
    regards
    Edited by: chris227 on 19.06.2012 14:13

  • BI Publisher Word Template The report does not contain any data fields.

    I have OBIEE BI Publisher report (10.3.4) working fine using BIP but using MS Word 2003 I want to create new template and want to add charts etc.
    Step 1. In MS Word I successfully login Oracle BI Publisher as Administrator
    2. Oracle BI Publisher -> Open (I open the report)
    3. Go to Insert -> Table Wizard
    I get this error:
    The report does not contain any data fields. Please make sure that the reports generates data with the default settings or provide a valid XML file.
    Please help

    Hi
    How do I load XML data? Also why XML data load is required? Do I have to export XML data from BIP View screen and load from the same file from the word?
    Please clarify
    Thanks

  • Adding Data Field to Sales Analysis Report

    Does anyone know how to add data fields to Sales Analysis Reports, either in PLD or CR?  On Sales Analysis by Customer, I need to add the total quantities for all items sold for the sales included in the report, excluding negative quantities.
    Thank you,
    Avraham

    Hi Avraham.......
    You can create your own Query Report for getting all the desired outputs and it will be easy to show in reports also.....
    Regards,
    Rahul

  • Billing report with due date field

    Dear Friends,
    Can you please tell the logic of Billing report with due date field.
    Input.  billing document no, date range, sales organisation
    Output : billing document no, sales organisation, Amount. Due date.
    If any clarification required, Please let me know.
    Thanks in advance
    Ranjan

    Is it VF05 is suffiant for your purpose?
    use further selection criteria tab.
    Amit.

  • How do I apply filters or limit the rows on my report using a Date field in SQL report builder 3.0?

    I have a status of completed and a date field in the dataset. The date field is either empty or contains a date. All 2015 dates are holding dates.
    So how can I limit the report to only pull completed status with an empty date or a holding date?
    I have not been able to set an OR option on a date field filter and if I add two filters on the date column one for empty one for > 12/31/2014 then it treats it as an "and" and pulls nothing from the list I have in sharepoint.
    any help will be appreciated.

    Hi MB,
    In Reporting Services, the relationship of  filters is “And”, and there is no option to change the relationship from “And” to “Or”. While we can use “or” operator within the expression to create one filter to integrated all filters to work around this
    issue.
    We can add a filter as follows in the dataset to limit the rows in your report:
    Expression: =Fields!date.Value is nothing or Fields!date.Value>"12/31/2014"    Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • POs with inbound deliveries

    Hi Gurus, I want to find out Purchase Orders  with inbound deliveries. What selection criteria I should try? Will it be thru T.Code ME2N. The scenario is : A reporting has to be done on Purchase Orders with and without deliveries. Thanks, Kumar

  • Best approach to pull data from email

    I am a teacher at a high school that uses an online program to do some homework and quizzes. At present, I get the emails and manually read them and enter the scores by hand into a spreadsheet. I have been doing some searching around for scripts that

  • How to mix table cells in keynote for ipad ?

    I am trying to mix some table cells in my keyonote for iPad, but can not find how. I had created the presentation at my MacBook but when transfered for the iPad, it did lost this format.

  • Help about editing text file by QT

    Hi again I have faced another problem today >> which is so bad see this screenshot to understand the problem : http://qkpic.com/c28fb Has anybody an idea about how to solve that ? This is a quick review about how to do it : http://www.youtube.com/wat

  • Using ALT+cursor function of apple keyboard for windows program

    Not sure where to ask this question, but here goes. My company uses a web based transportation routing program I can access from my home computer, (which is a Mac using Mac, not windows). Using the program requires the ability to often select or dese