Create condition based on date and time

Hi everyone,
I'm using Discoverer Plus 10g. I want to create a condition in my worksheet using StageTime (consists of date and time) as the parameter, i.e. StageTime > StartTimeParameter and StageTime < EndTimeParameter.
I am able to create condition based on the date, but unable to create based on the time. I need to limit the data up to the hour, e.g.
StageTime > 11-NOV-2005 1 AM and StageTime < 11-NOV-2005 3 AM.
But so far I am unable to create a condition for the hour element.
I try to use this:
TO_DATE(TO_CHAR(:Start Date Parameter,'mm-dd-yyyy')||' '||:Start Hour||':00:00','mm-dd-yyyy hh24:mi:ss')
Start Date Parameter is selected using the date picker in Discoverer Plus
and the Start Hour is in the format '00' to '23'
but was prompted with the error: ORA-015858 a non numeric character was found where a numeric was expected.
Would really appreciate anyone's help on this! :)
Thanks,
Angeline :)

how about, if :Start Date Parameter is of type DATE and :Start Hour is of type varchar2(2) to simply do
:Start Date Parameter + to_number(:Start Hour)/24
?

Similar Messages

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • Create a folder with date and time

    hey yall. i'm working on a program to assign files to a created directory. for the sake of organization, i want to create a folder that is the date and time it was created. (ie c:\\new\\02-Jun-2008\\file.txt) i know i'm missing something. here's the code i have so far to create the folder:
    Format formatter;
    Date date = new Date();
    formatter = new SimpleDateFormat("dd-MMM-yy_hh:mmaaa");
    String s = formatter.format(date);
    String path = "C:\\new\\";
    String destination = path + s;
    File d = new File(destination);
    d.mkdirs();
    i know its trivial for any advanced user but im only a student and any advise or useful links are great. i'll keep searching in the meanwhile. thanx.

    got it myself. failed to remember NO : are allowed in windows. <sigh>

  • Route calls to specific number based on Date and Time

    Hi,
    UCCX 8.5.1.11001-22
    I am trying to create a script that will route calls to a specific number after-hours.  The only catch is the number changes every week and rotates among 4 or 5 people.  I have seen several scripts and xml documents up that give me a good start but I just cant seem to figure out the process with the xml document and call flow of this one.  I do realize this is basically a programing question but if you could get me headed in the right direction it would help.
    I am no stranger to UCCX scripting but a novice to xml integration.

    I'm not sure what the SM toolkit is.  Could you explain it or provide a link?
    If you and your collegaue are admins, then I would say skip the overhead of an XML document for now and just manage the schedule in a subflow.
    Example:
    Subflow Variables
    String oncall_number_current = ""String oncall_number_avholloway = "916125551212"String oncall_number_jsmith = "916125551313"String oncall_number_default = "916125551000"Date today = D[now]
    Subflow Script
    StartSwitch int (today.month)  January (value == 1)
        /* In Jan, from the first to the fifteenth, Anthony is on call */    If (today.date >= 1 && today.date <= 15)
          True        Set oncall_number_current = oncall_number_avholloway
            Goto End of Script      False
        /* In Jan, from the sixthteenth to the thirty-first, John is on call */    If (today.date >= 16 && today.date <= 31)
          True        Set oncall_number_current = oncall_number_jsmith
            Goto End of Script      False
      Febraury (value == 2)    /* In Feb, from the first to the sixth, Anthony is on call */
        If (today.date >= 1 && today.date <= 6)      True
            Set oncall_number_current = oncall_number_avholloway        Goto End of Script
          False    /* In Feb, on the seventh, from midnight to noon, Anthony is on call */
        If (today.date == 7 && today.hod >= 0 && today.hod <= 11)      True
            Set oncall_number_current = oncall_number_avholloway        Goto End of Script
          False    /* In Feb, on the seventh, from noon to midnight, John is on call */
        If (today.date == 6 && today.hod >= 12 && today.hod <= 23)      True
            Set oncall_number_current = oncall_number_jsmith        Goto End of Script
          False    /* In Feb, from the eighth to the twenty-nineth, John is on call */
        If (today.date >= 8 && today.date <= 29)      True
            Set oncall_number_current = oncall_number_jsmith        Goto End of Script
          False  March (value == 3)
        ..etc, etc, building out the whole year...  Default
        /* Set the default on call number */    Set oncall_number_current = oncall_number_default
        Goto End of ScriptLabel End of Script
    End
    Main Script Variables
    String oncall_number = ""
    Main Script Script
    ...oncall_number = Call Subflow (SCRIPT[oncall-sublfow.aef], oncall_number_current)Call Redirect (--Triggering Contact--, oncall_number)...
    In the example of January 3rd, the subflow would execute 4 steps.  That's not much at all.  Of course you would only call the subflow if the hours called for it.  This would eliminate unecessary calls to the subflow.
    To update the oncall, just update the script, save, upload, refresh, and then refresh the apps which call it.  No down time at all!
    I hope that makes sense.  If not, ask questions.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Date and time for background job

    Hi,
    I am creating a program with out selection screen . This program runs based on date and time . so I need to create a table
    with date and time fileds.
    Program runs based on FROM DATE FROM TIME  TO DATE  TO TIME....... FROM DATE and FROM TIME  will get it from ztable and TO DATE & TO TIME values as SY-DATUM & SY-UZEIT. In the end I will update sy-datum and sy-uzeit values in the custom table to get the values ( Use it for from date from time ) for next run of the program.
    This program is mainly used for background job so how do we get the values of from date and from time for the first run of the program ? how do we update the latest date and time details by deleting old date and time details.
    Thanks ,
    Vinay.
    Edited by: Vinay parakala on Apr 22, 2010 9:18 AM

    First of all, I'll suggest to maintain TVARVC instead of doing it in custom table unless you need a complete log.
    As per my understanding, you are trying to fetch some records based on the time period(Delta loads).
    So, you will do an initial run to load the complete data then you will run it for time periods. For example,
    1st Load- 01/01/1991(earliest date possible) - today's date say 03/22/2010
    2nd load- 03/22/2010 - today's date
    so on............
    You have to move the to date values to from date values and to date value needs to be updated by the latest one for each load.
    Do you have any dependency on background job? Please let me know if my understanding is correct or specify your requirement in detail.

  • Handling DATE and TIME in SELECT Statment

    Hey pros,
    I have this problem where I want to execute a select query based on date and time, but I want it to be handled in such a way which is better explained with this example:
    User enters a date range of Apr. 10 and Apr. 12
    User enters a time range of 9:00am - 10:00am
    The results I want would be from April 10 9:00am to Apr. 12 10am.
    The way I have it working today is that it shows me all data from Apr. 10-12 from 9am-10am on all days.
    Is there an easy way to do this?
    Here is my code (see the 3rd last and 2nd last line)  Thanks!
    SELECT vepowerks vepolgort vepo~matnr
              mara~mtart
              vepovenum vepovepos
              vekperdat vekperuhr vekpstatus vekpexidv
              "gc_bwart as bwart
              vepovemng vepovemeh
              vepo/cwm/vemng vepo/cwm/vemeh
        INTO CORRESPONDING FIELDS OF TABLE gt_tran
    INTO CORRESPONDING FIELDS OF TABLE itab
        FROM vepo
          INNER JOIN vekp ON
              vepovenum = vekpvenum
          INNER JOIN mara ON
              vepomatnr = maramatnr
        WHERE
              vepo~werks = p_werks    AND
              vepo~lgort IN s_lgort   AND
              vepo~matnr IN s_matnr   AND
              vepo~bestq = gc_bestq   AND
              NOT ( vepovemng = 0 AND vepo/cwm/vemng = 0 ) AND
              vekp~status = gc_status AND
              vekp~erdat IN s_erdat   AND
              vekp~eruhr IN s_eruhr   AND
              mara~mtart IN s_mtart.

    I think you might just have to select the date range, then do a loop and read table.
    select xx where date in date_range from x into table y.
    loop at y into wa_y.
      if wa_y-date = lower_date_limit. "this day has the 9am limit
        "only pick those records that have wa_y-time GE 9am.
        <your logic here>
      elseif wa_y-date = upper_date_limit. "this day has teh 12pm limit
        "only pick those records that have wa_y-time LE 12pm.
        <your logic here>
      else. "every day in between the dates
        "get all data no matter what the time is
        <your logic here>
      endif.
    I honestly don't know if there is a select-where clause that will do this automatically, but the above solution should work..hope this helps.
    --Juan
    Edited by: takeabyte on Apr 29, 2010 8:36 PM

  • Created Date and time of a Historical Transport Request

    Hello,
        Is there a way for me to find the created date and time of a Transported Request (DEV>QTY>PRD)? I mean the TR which is now realesed and transported to production system?
    I will award full points to the best answer.
    Thanks in advance!
       ---ANiL
    Edited by: Anil Raparthi on Sep 11, 2008 2:09 PM

    Dear Anil,
    We generally follow a convention where we put the date of creation of the transport request in its description, so that we can identify the requests' based on creation date.
    There has to be some table to store such creation dates but I am not aware of any
    Regards,
    Yogesh

  • HOW: File handling - Date and time of file created/modified

    Hi all,
    Is there any way by which we can find out the date and time of the file created in operating system using file handling through PL/SQL.
    Eg:-
    I have a directory in which I am storing some files, and for a given file name I must know when that file was created, i mean date and time.
    Might be there is some simple way, please help out.
    regards
    CJ

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#73995149457661
    Remember to get the correct privs (java privs) on the directory.
    Mette

  • Every time I create a new row, I want a certain cell to display the date and time the row was created.  How do I do that?

    =NOW() updates the date and time continuously, I don't want to do that.  I just want the date and time in that cell to stay the same after that row is created.  Seems like this would be easy, but I can't figure it out.

    My preferred scheme is a variant of Barry's proposal 2
    create the new row
    select the cell in which you want to insert the date
    type the shortcut dedicated to one of the four "Insert date" services delivered with WordService from Devon Technologies (FREE)
    On a French keyboard, only one of the default shortcuts apply : cmd % which inserts the long date.
    But we may edit these shortcuts.
    Yvan KOENIG (VALLAURIS, France) mercredi 6 juillet 2011 15:12:16 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • The date and time of files created and saved are off

    I notice that under the date modified column, files that I have saved or updated are usually a day off. I checked the date and time in the system preferences and it is correct. is something wrong with the battery?

    Hi, paulmont -
    Be sure the Time Zone setting is correct.
    If you have time displayed as 12-hour (rather than 24-hour), be sure the AM/PM setting is correct. Having that wrong will displace the mod/create date/time recorded for a file by 12 hours, which will (at times) shift it to another day.
    If you use Classic, make sure the same settings are in Classic as well as in OSX, particularly the Time Zone setting. This is especially true for machines which can be and are booted into OS 9. The typical symptom for this being the cause is an offset of one or a few hours.

  • Created date and time

    Hi experts,
                      How can i view the created Time & date of a sales order and its invoice.And also the changed time and date.
    Many Thanks In advance.
    Abhishek

    Hi,
    Goto the T.Code "SE11/SE16".
    Enter the table name as "VBAK".
    Enter your sales order number into the field "VBELN" and then Execute.
    Get the Created date from the field "ERDAT" and time from the field "ERZET".
    Next for getting the creation date and time for Billing document,goto the table "VBRK".
    Pass the billing document number.Execute.
    Get the Created date from the field "ERDAT" and time from the field "ERZET".
    For getting the changed details,there are different ways.
    One such easiest way is goto the T.Code "VA03",Enter your order number.
    Click on Environment-->Changes.
    Select "Overview" and "Additional Info".
    Execute.
    Select your entry and click on choose.
    Here you will get the date and time.
    The similar thing is for billing document changes also use teh T.Code "VF03".
    Or one more way is pass the Order number preceeded by two 0's into the field "Object Id" in the table "CDPOS" and then execute.
    Get teh Changenr.
    Pass the same to "CDHDR" table to get the UDATE and UTIME.
    Regards,
    Krishna.

  • Job created date and time.

    hi,
    I am created the job with single step of program.
    my problem is, i am passing the job DATE and TIME to select query in the program.
    when ever job is execute ,what ever records in the table it is retrived,sometime job abends ,we restart the job,it is retrive the records from the last date and time.
    but it is not happening now ,can you help me.
    for the following query.
    select aufnr from z<table> where created_date = SDLDATE
                                                    created_time = SDLtime.

    Hi,
    perhaps, your query is not correct? It should be
    SELECT ... INTO <work area>
       Please reward points if useful.
                 Kind regards, Marina

  • Create/update date and time for any object

    Hi All,
    How to find that at what date and time at which perticular object is created or updated.
    Thanks,
    Nitesh

    Example below:
    [email protected]> alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss'
    2 /
    Session altered.
    [email protected]> select owner, object_name, last_ddl_time
    2 from dba_objects
    3 where owner = 'MOB' and object_name = 'T';
    no rows selected
    [email protected]> create table t(id int);
    Table created.
    [email protected]> select owner, object_name, last_ddl_time
    2 from dba_objects
    3 where owner = 'MOB' and object_name = 'T';
    OWNER OBJECT_NAME
    LAST_DDL_TIME
    MOB T
    30-08-2006 14:15:58
    [email protected]> column object_name format a30
    [email protected]> /
    OWNER OBJECT_NAME LAST_DDL_TIME
    MOB T 30-08-2006 14:15:58
    [email protected]> alter table t add x int;
    Table altered.
    [email protected]> select owner, object_name, last_ddl_time
    2 from dba_objects
    3 where owner = 'MOB' and object_name = 'T';
    OWNER OBJECT_NAME LAST_DDL_TIME
    MOB T 30-08-2006 14:16:25
    Best Regards
    Krystian Zieja / mob

  • Create quick event fails to recognize date and time

    When I use "Create Quick Event" and enter "June 29 9am debate", iCal creates an event today, now, named "June 29 9am debate". I have tried different variations like "29th of June at 9am" etc. but all failed - I always get an event today, now.
    I am pretty sure Create Quick Event used to extract date and time from the box: it created an event named "Debate" on the date of June 29, starting at 9am, lasting one hour - what could be the reason it doesn't work any longer? And more importantly, how could I get back the old behavior?
    Thanks!

    It is not prerly connected to the network
    Make sure location is set correctly
    DNS should be set to auto (settings - general - network)
    If on wifi try ethernet
    Ensure rputer has port 123 open (refer to manual if unsure)

  • Automatically creating data filename out of date and time information

    I read somewhere (in a book, here ?) about a programmer who never keyed in a data filename to save his data file. He just used the system date and time to create his filename. For example: now would be 20028141032.dat (2002, August 14, 10:32 am)
    I am looking to do something similar. I do want to add a spot of text after the date and time and save it as *.xls.
    This way when you have a long list of data files, if you sort by name, they are sequentially in order.
    Thanks for any help.
    Terry

    Hi Terry,
    You can use "Seconds to Date/Time" Funtion along with "File Dialog" Function to accomplish your task. You Unbundle the cluster from the "Seconds to Date/Time" with Year, Month, Day, Hour and Minute Information Convert and Append into One String. You Can add Pre or Post text to this String. Wire this to File Dialog Box and it will Pop up the Window With File Name in it as Default. Also the extemsion of the file name can be specified here. The User has Option to change this or accept this default name.
    I have attached an Example Vi to Illustrate this(LV6.1) Take a Look. To Use this Just Wire the Path Information to your Saving Functional VI. Also the Vi Checks if File Exists or Dialog Box is Cancelled. And You may Build Functionality for the
    se if you need them.
    Good Luck.
    Mache
    Good Luck!
    Mache
    Attachments:
    DateStamped_File_Name.vi ‏29 KB

Maybe you are looking for

  • Provider Hosted App not listed in the App Part or Web Part

    What I have done:                 I have created developer site collection in office 365                  I have created a provider app in visual studio, modified appmanifest.xml with the client id, client issue (from developer site) and provided tar

  • My iPod touch needs to be activated and the screen is locked.

    My iPod touch screen wasn't working so I turned it off. After I turn it on again it says "activation requiered". I went to the iTunes in my computer and try to activate it but then it says It was locked and I need it to enter the pass code, even thou

  • Advance Reporting Technique from Calendar Link

    I have created a calendar with a namelink, and am trying to link the namelink from a certain date to a dynamic page that displays further information about the event on the date. I have a description column in info table which has the information. Wh

  • Txt formatting issues with fields in text object

    Post Author: David Goldman CA Forum: General Hi, complete newbie here.  I'm working on my company's estimating form.  I was requested to combine fields FCITY FSTATE and FZIP into one line that auto flows any given data.  So I used a Text object with

  • Bent Aluminum Around Ethernet Port. Fix?

    I recently dropped my phone (less than 1 foot drop) on the side of my MacBook Pro and was surprised to learn that the aluminum on top of the Ethernet port was bent (a noticeable bend). I am wondering what are my options about fixing this cosmetic pro