Current Hour -5

Hello I am building a subselect to display the current date, month and HOUR-4 in the format DDMM(HH-4) e.g Current date: 17 Sep 10am -> Needed Select output 170906
I have tried the following and it is quite close:
SELECT TO_CHAR(SYSDATE, 'DD')||
TO_CHAR(SYSDATE, 'MM')||
DECODE ((TO_CHAR(SYSDATE, 'HH24')),
-4, 00,
-3, 01,
-2, 02,
-1, 03,
(TO_CHAR(SYSDATE, 'HH24')-04))
FROM DUAL;
Unfortunatelly it truncates the 0 from the hour and i need the hour in HH24 format
170906 ->needed
17096 -> what I get.
Any help will be much appreciated.
Thank you

look at your code, the output is correct:
SQL> select to_char(sysdate, 'hh24') from dual;
TO
09
SQL>
but as you now subtract 4 from the result, Oracle has to convert the string to a number and the default number format is without leading 0.
You could format it again with a to_char(..., '09')
But why don't you just let Oracle do the math in the date?
SQL> select sysdate, to_char(sysdate - 4/24, 'hh24') from dual;
SYSDATE             TO
17.09.2010 09:43:06 05
SQL>

Similar Messages

  • Expression for the current hour

    I'm trying to assign a lead based on the current time and a user's hourly shift availability - is this doable? I was thinking to use custom fields that track the user's hourly shift in a 24 hour day (e.g. shift start and end fields: for example 8am to 5pm EST, using a 24 hour clock) - maybe I should store as an integer field to better make the comparison? What is an expression to extract the current timestamp's hour so I can compare?

    I think I got it tochar(timestamp,'hh24')

  • Cant get the current hour

    Hi i am trying to get the hour of the current time using the calendar class and when the time is on the 12th hour, the hour returns 0 instead of 12.
    here is my code below:
    //Update the time
                        calendar.setTime(new Date());
                        hour = calendar.get(calendar.HOUR);

    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html
    * Field number for <code>get</code> and <code>set</code> indicating the
    * hour of the morning or afternoon. <code>HOUR</code> is used for the
    * 12-hour clock (0 - 11). Noon and midnight are represented by 0, not by 12.
    * E.g., at 10:04:15.250 PM the <code>HOUR</code> is 10.
    * @see #AM_PM
    * @see #HOUR_OF_DAY
    */

  • Display Current Time and past 3 hours

    Post Author: gronkette
    CA Forum: Formula
    I have a report that I need to display only the current hour and the past 3 hours rolling forward.
    Example:  If it is now 12:00 (noon)  I would like to see the data for 10:00, 11:00 and 12:00
    Then we it is 1:00 pm, I would like to see the date for 11:00, 12:00 and 1:00 - etc....
    thanks!
    Filed under: CRXI

    Post Author: SKodidine
    CA Forum: Formula
    The formula works just fine in my report, all I can say is make sure that the database field is DATETIME and that the values do indeed have date time.

  • How to get current time in jsp page?

    my problem is :-
    i have a radio buttons with name as 9am, 11am ,1pm, 3pm , 5pm , 7pm , 9pm , 11pm , 1am , 3am ,5am 7am. what ever the current time may be the radio button of four hour plus than current time should be atomatically checked and previous radio buttons should be disabled. for example suppose current time is 11.02am than the radio button of 3pm should be automatically checked and previous radio buttons should be disabled.
    please help me if u can?

    This should work but it needs testing out around midnight ( not sure if it is 00:00 or 24:00):
    <%@ page import="java.util.*" %>
    <html>
    <head><title>Time Page</title>
    </head>
    <body>
    <% Calendar c = Calendar.getInstance();
       c.add(Calendar.HOUR_OF_DAY, 4);
       int h = c.get(Calendar.HOUR_OF_DAY); %>
    The current hour is <%= h %><br>
    <% for (int i=0; i < 24; i++) { %>
       <input type=radio name=time <%= (i < h) ? "disabled" : ""%><%= (i == h) ? "checked" : ""%>><%= (i < 10) ? "0" : ""%><%= i %>:00<br>
    <% } %>
    </body>
    </html>

  • Peel off hourly output value and subtract from previous hours (then write to file)

    Here is another problem I have been working with and what I have tried so far.  Right now, my current VI is writing data to an excel file at a point every second.  I would LIKE peel off a point from this datastream once every hour and subtract it from the previous hour's value and write an hourly value to an excel file (same file or different file is ok).  I was working with a guy here at my university who had some ideas to use the Elapsed time function.  I have included a screenshot of the part of the VI containing the function we were working on.  We never could get it to work quite right.  We were having some problems getting the shift registers to work (used to subtract the current hour's value from the previous hour's value).  Let me know if you have any ideas, if maybe we are on a good pathy, or maybe I should try something altogether different.  I'm just looking for a simple solution at this point.
    Thanks,
    Jeremy
    The local variable "Total Consumption" is the data stream off of the hourly values are being taken.  Currently (not shown in this screen shot), the value of "Total Consumption" is combined with the other channels into one signal that is fed into the "Write to Measurement File" VI (shown at the right).

    You have a true constant wired to your stop button for the loop, which means the loop will only run once.
    You may want to consider the positions of the previous and current indicators inside that loop.  It's not clear how you want them to function.  The previous indicator doesn't get updated until right as the elapsed time occurs.  The case structure gets executed, and you will immediately have a new previous value calculated, but you won't see that again until the end of the next hour.  Not sure if you are updating the current value in the false case as well.  Otherwise that would look like stale data for an hour.  If you are updating it in the other case, than you should move the local variable and the indicator completely out of the case structure and only pass in the wire to the subtraction function.

  • Filter row data to Show Last Hour data

    Hi ALL
    I need to apply filter on Row Group in report based on last hour data from current hour .
    I'm using;
    =Datepart("h",dateadd("H",-1,now))
    On Row Group
    but it does not show any row.
    but When i used ;
    =Datepart("h","2013-12-20 01:00:00")
    It Works ..
    Kindly help me how can i filter row data to  Show Last Hour data.
    Thanks

    Thos works fine for me
    =Datepart(DateInterval.Hour,DATEAdd(DateInterval.Hour,-1,Now()))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Need Help with complex query and computing values

    I have an issue trying to combine data from several tables. I need help trying to compute the "Total Hours", "Max Pressure" ,"Average Pressure" while displaying the "Manufacturer",
    "Part Type" , "Serial Number", "District", "Status","Truck Type",and "truck number" for a certain Part on all Trucks. I need to be able check and see if the serial number was on
    a particular job and calculate the hours of that serial number if it was on that job and the jobdate falls between the install date and removal date. Ive tried but keep getting either
    repeating rows, total hrs of the truck instead of the serial number. Ive considered doing a pivot to display it but have been having trouble putting it together.
    table 1
    (*records of parts*)
     Contains  serial number,truck number, part type, part number, install date, removal date, status
    table 2
    (*records of Jobs*)
    contains Jobnumber, JobStartdate, Max pressure, average pressure, and Totalhrs
    table 3
    (records related to jobs and trucks)
    contains jobnumber, district , and truck numbers
    Table 4
    (records of manufacturers and part numbers)
    contains partnumber, manufacturer name, and truck type
    I would like to get it to show like below
    SerialNo   PrtType       
    MFG      TruckNo  
     TrkType    TtlHrs 
       MaxPr   AvgPr 
      Status    
    Dst
    AB345     1200series  
    NGK        2G34        
    Boss X       400     10,000 
     9500  NonOp    
    NE
    Thanks in advance

    Hope this helps
    Note: (Date of Mar 1 2014 was just extended to a further date so the system would know that its still operating when calculating current hours)
    Table 1
    SerialNo    TruckNo  InstallDate RemovalDate      Status       PartNo      PartType
    BJ1002       F917   2013-09-17   2014-03-01   Oper         L871235       BJ 3000 GL
    CWS1002   F104   2012-11-21   2013-03-29   NonOper   L76088-450   CWS 2000
    CWS1003   F104   2013-04-24   2013-08-01   NonOper   L76088-450   CWS 2000
    CWS1005   F187   2012-11-21   2013-04-04   NonOper   L76088-450   CWS 2000
    CWS1006   F187   2013-04-24   2013-06-30   NonOper   L76088-450   CWS 2000
    CWS1007   F187   2013-06-30   2013-03-01   Oper         L76088-450   CWS 2000
    CWS1009   2F60   2013-05-05   2013-03-01   Oper         L76088-450   CWS 2000
    CWS1011   F809   2013-05-28   2013-08-28   NonOper   L76088-400   CWS 2000
    CWS1013   F990   2013-06-11   2013-10-29   NonOper   L76088-450   CWS 2000
    CWS1015   F783   2013-06-28   2013-03-01   Oper         L76088-450   CWS 2000
    Table 2
    JobNumber    Date                 District         PrAvTreat PrMaxTr TotalHrs
    553811287    2012-01-19    Fairmount    7337        8319     1.53
    652110088    2012-08-20    San Antonio  6340       7075      0.47
    652110090    2012-08-21    San Antonio  6134       7131      0.62
    652110091    2012-08-22    San Antonio  6180       2950      0.58
    652110092    2012-08-23    San Antonio  5959       6789      0.64
    652110093    2012-08-23    San Antonio  6165       7466      0.62
    Table 3
    TruckNo District    JobNumber
    1F01      Odessa   10011012329
    1F01      Odessa   10011012333
    1F01      Odessa   10011014831
    1F01      Odessa   10011014834
    1F01      Odessa   10011012332
    1F01      Odessa   10011012328
    1F01      Odessa   10011014829
    Table 4
    PartNumber    Manufacturer  TruckType
    L322020-2     Jimmy Dean   Ford T
    L322738-2     Lucas             Ford T
    L47869-1       Jimmy Dean   Ford T
    L76070-650   NGK               Ford T   
    Sam Howard

  • Include Field Labels in GUI_Download

    How do I include field labels in GUI_DOWNLOAD (I am using it to download an Excel file from an internal table)?  I see a table called fieldnames but when I add fields to that table they system only shows the first field.  How can I show a label for each row, in Excel?
    See the code below:
    wa_fade_fields-posid = 'Project#'.
      wa_fade_fields-poski = 'Phase Code'.
      wa_fade_fields-usr02 = 'WBS Element'.
      wa_fade_fields-txt04 = 'Status'.
      wa_fade_fields-sakto = 'Cost Elem'.
      wa_fade_fields-vrsen = 'Vsn'.
      wa_fade_fields-wrttp = 'VT'.
      wa_fade_fields-planned_hours = 'Planned Hours'.
      wa_fade_fields-arbei = 'Current Hours'.
      wa_fade_fields-ismnw = 'JTD Hours'.
      wa_fade_fields-etc = 'Estimate to Complete'.
      wa_fade_fields-variance = 'Variance'.
      wa_fade_fields-percent = 'Percent'.
      INSERT wa_fade_fields INTO TABLE it_fade_fields.
    *Fade table
      CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                    =
        filename                        = d_fullpath
    *   FILETYPE                        = 'ASC'
    *   APPEND                          = ' '
        write_field_separator           = 'X'
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
        dat_mode                        = 'X'
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        data_tab                        = it_fade
       fieldnames                      = it_fade_fields
    * EXCEPTIONS
    *   FILE_WRITE_ERROR                = 1
    *   NO_BATCH                        = 2
    *   GUI_REFUSE_FILETRANSFER         = 3
    *   INVALID_TYPE                    = 4
    *   NO_AUTHORITY                    = 5
    *   UNKNOWN_ERROR                   = 6
    *   HEADER_NOT_ALLOWED              = 7
    *   SEPARATOR_NOT_ALLOWED           = 8
    *   FILESIZE_NOT_ALLOWED            = 9
    *   HEADER_TOO_LONG                 = 10
    *   DP_ERROR_CREATE                 = 11
    *   DP_ERROR_SEND                   = 12
    *   DP_ERROR_WRITE                  = 13
    *   UNKNOWN_DP_ERROR                = 14
    *   ACCESS_DENIED                   = 15
    *   DP_OUT_OF_MEMORY                = 16
    *   DISK_FULL                       = 17
    *   DP_TIMEOUT                      = 18
    *   FILE_NOT_FOUND                  = 19
    *   DATAPROVIDER_EXCEPTION          = 20
    *   CONTROL_FLUSH_ERROR             = 21
    *   OTHERS                          = 22
    Regards,
    Davis

    I think the problem might be with the WORK AREA structure, the work area which contains the description should be atleast 50 characters long so that it can accomodate all the characters...
    Declare it something like this
    DATA: BEGIN OF excel_schedule OCCURS 0,
            refno(50),
            ebelp(50),
            etenr(50),
            eindt(50),
            menge(50),
            ameng(50),
          END OF excel_schedule.
    Ok there is another simple way of doing this
    Use GUI_DOWNLOAD twice and the second time you just append it to the existing first file...
    SAmple code
    DATA: BEGIN OF excel_schedule OCCURS 0,
            refno(50),
            ebelp(50),
            etenr(50),
            eindt(50),
            menge(50),
            ameng(50),
          END OF excel_schedule.
    * Download to Workstation the Description Fields of error schedule file
      CALL FUNCTION 'GUI_DOWNLOAD'"
        EXPORTING
         filename                        = w_lstring
         filetype                        = 'ASC'
         write_field_separator           = 'X'
        TABLES
          data_tab                        = excel_schedule
       EXCEPTIONS
         file_write_error                = 1
         no_batch                        = 2
         gui_refuse_filetransfer         = 3
         invalid_type                    = 4
         no_authority                    = 5
         unknown_error                   = 6
         header_not_allowed              = 7
         separator_not_allowed           = 8
         filesize_not_allowed            = 9
         header_too_long                 = 10
         dp_error_create                 = 11
         dp_error_send                   = 12
         dp_error_write                  = 13
         unknown_dp_error                = 14
         access_denied                   = 15
         dp_out_of_memory                = 16
         disk_full                       = 17
         dp_timeout                      = 18
         file_not_found                  = 19
         dataprovider_exception          = 20
         control_flush_error             = 21
         OTHERS                          = 22
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    * Download to Workstation the error schedule file
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = w_lstring
          filetype                = 'ASC'
         append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t1_eschedule
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    use the append property of GUI_DOWNLOAD the second time

  • Aging algorithm...

    Hey there..
    Can anyone give any insights on the aging algorithm that TM uses? I mean this application is going to back up on a regular schedule until all 500GB on the drive is consumed.. but then what? How does it decided what to "get rid" of in order to maintain integrity of the backup data over time?

    TM maintains backups as follows
    The initial backup is the first hourly backup.
    1. Performs hourly snapshots for 24 hours (can be a few more than 24 at times)
    2. The first backup that runs after midnight will take the last hourly backup done prior to midnight and save that as a daily backup.
    3. The daily backups are collected up for 30 days (or one month)
    4. After a month and one week or partial week all daily backups for Mon thru Sat are discarded and the Sun daily is kept as a weekly backup.
    5. As each week passes the action in 4) above is performed.
    Soooooo, say after 6 months you will have 5 months of weekly backups (constituting some 20 t0 22 weekly backups) and 30 daily backups and a few hourly backups.
    When the disk fills TM will try and remove some of the old weekly backups to make room. It's unclear to me just how far TM will go to make more room for the current backups. However, if the current backups are relatively small I believe TM will simply remove a few of the oldest weekly backups until it has regained sufficient disk space to complete the current hourly backup.
    TM will always keep important OS related files so that a full OS restore can be done. Typically these OS related files are captured during the initial backup. However, more OS related files can be captured immediately TM backup executes after you've done an OS upgrade such as 10.5.1, 10.5.2, 10.5.3, etc.
    Hope that clarifies things for you.
    Good luck.

  • Time variables with if and else statements for class script

    Hello, for an in class assignment to create a script using random generated answers im trying to get the script set up for different answers depending on the time of day here is what i have so far, in bold is my second time that i would like to have if the
    time is 6pm, the one that works right now is the one that is anything greater then 12pm and the one that is everything before 12pm the 6pm will not work:
    #Clear the Windows command console screen
    Clear-Host
    #Define the variables used in this script to collect player inputs
    $question = ""   #This variables will store the player's question
    $status = "Play"  #This variable will be used to control game termination
    $answer = 0  #This variable stores a randomly genrated number
    $time = (Get-Date).Hour  #This variable stores the current hour of the day
    #Display the game's opening screen
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host "               W E L C O M E   T O   T H E   W I N D O W S"
    Write-Host
    Write-Host
    Write-Host
    Write-Host "            P O W E R S H E L L   F O R T U N E   T E L L E R"
    Write-Host
    Write-Host
    Write-Host   
    Write-Host "                          By Zelandra"
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host " Press Enter to continue."
    #Pause script execution and wait for the player to press the Enter key
    Read-Host
    #Clear the Windows command console screen
    Clear-Host  
    #Provide the player with instructions
    Write-Host
    Write-Host " The fortune teller is a very busy and impatient mystic. Make"
    Write-Host 
    Write-Host " your questions brief and simple and only expect to receive"
    Write-Host
    Write-host " Yes / No styled answers."   
    Write-Host 
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host " Press Enter to continue."
    #Pause script execution and wait for the player to press the Enter key
    Read-Host
    #Continue game play until the player decides to stop
    while ($status -ne "Stop") {
      #Ask the player the first question
      while ($question -eq ""){
        Clear-Host  #Clear the Windows command console screen
        Write-Host
        $question = read-host " What is your question? "
      $question = ""  #Reset variable to a empty string
      #Retrieve a random number between 1 and 7
      $answer = Get-Random -minimum 1 -maximum 8
      #If it is the night the fortune teller will be a little more cranky 
      if ($time -gt 18) {
        Write-Host
        if ($answer -eq 1) { " Grrrr. The answer is NO, now let me get back to sleep!" }
        if ($answer -eq 2) { " Grrrr. The answer is !!!NEVER!!!" }
        if ($answer -eq 3) { " Grrrr. The answer is unclear, did you really think i would know?" }
        if ($answer -eq 4) { " Grrrr. The answer is sure whatever!" }
        if ($answer -eq 5) { " Grrrr. Even if i wanted to tell your fortune i wouldnt!" }
        if ($answer -eq 6) { " Grrrr. Look at the time, im busy SLEEPING!" }
        if ($answer -eq 7) { " Grrrr. Take whatever answer you want and leave me alone!" }
      #Select an answer based on the time and the random number
      #If it is the afternoon the fortune teller will be a little cranky
      if ($time -gt 12) {
        Write-Host
        if ($answer -eq 1) { " Grrrr. The answer is no!" }
        if ($answer -eq 2) { " Grrrr. The answer is never" }
        if ($answer -eq 3) { " Grrrr. The answer is unclear!" }
        if ($answer -eq 4) { " Grrrr. The answer is yes!" }
        if ($answer -eq 5) { " Grrrr. The answer is absolutely not!" }
        if ($answer -eq 6) { " Grrrr. The answer is unforseeable!" }
        if ($answer -eq 7) { " Grrrr. Im sorry could you repeat that?" }
      #If it is morning the fortune teller will be in a good mood
      else {
        Write-Host
        if ($answer -eq 1) { " Ah. The answer is yes!" }
        if ($answer -eq 2) { " Ah. The answer is Always" }
        if ($answer -eq 3) { " Ah. The answer is uncertain!" }
        if ($answer -eq 4) { " Ah. The answer is no!" }
        if ($answer -eq 5) { " Ah. The answer is there is a fair cha... OH LOOK A SQUIRREL!" }
        if ($answer -eq 6) { " Ah. I think you meant to ask something else!" }
        if ($answer -eq 7) { " Ah. Well it looks like your wish will be ready tonight!" }
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host
      Write-Host " Press Enter to continue."
      #Pause script execution and wait for the player to press the Enter key
      Read-Host
      #Clear the Windows command console screen
      Clear-host
      Write-Host
      #Prompt the player to continue or quit
      $reply = read-host " Press Enter to ask another question or type Q to quit."
      if ($reply -eq "q") { $status = "Stop" }
    #Clear the Windows command console screen
    Clear-Host
    #Provide the player with instructions
    Write-Host 
    Write-Host " Very well then. Please return again to get all your questions"
    Write-Host " answered." 
    Write-Host
    Write-Host 
    Write-Host
    Write-Host
    Write-Host
    Write-Host 
    Write-Host
    Write-Host
    Write-Host  
    Write-Host 
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host 
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host
    Write-Host " Press Enter to continue."
    #Pause script execution and wait for the player to press the Enter key
    Read-Host
    #Clear the Windows command console screen
    Clear-Host  
    Thanks again if anyone can provide help.

    Hi,
    Use -and in your afternoon if test.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Using Timestamp [TS] in the output file name

    Hello Everyone,
    i am trying to get the timestamp into the output file generated by the store file atom. Since my Outbound channel is void i thought i could use:
    [TS]
    or
    [yyyy][mm][dd][hour][min][sec]
    My File Specification is: C:\Temp\Out\blabla[TS].xml and unfortunatelythe outputfile are named: blabla[TS].xml
    What am I doing wrong? Can i not use those placeholders in an atom?
    Help is greatly appreciated
    Best regards
    Simon

    Hi Simon,
    Now I see, you're trying to maintain the timestamp in the SLD FILO section and not in a store file atom of an integration scenario.
    In this case, please check the following help document:
    filePattern
    To define the outbound file pattern, define the directory and the file specification. Enter the full path. The integration framework supports Microsoft Windows UNC (Universal Naming Convention) names. The directory you enter must exist in the file system. The user for directory access must have the necessary rights in the file system.
    You can use the following special characters and variables:
    Character/
    Variable
    Description
    To introduce  numbering in the file directory use ?.
    If you enter  for example data????.xml, the integration framework creates an outbound file called data0000.xml, if the directory is empty. If a file, following this naming  convention, already exists in the outbound directory, the next generated file  name is data<last  number>+1.xml. If data0000.xml already exists in the directory, the next file in the directory  is data0001.xml.
    [vbiu]
    This is a placeholder for a value you can  define in scenario package processing. If you use the value, add the b1im_filename attribute directly in the outbound payload.
    <xsl:template  name="transform">
          <xsl:attribute  name="b1im_filename">myName</xsl:attribute>
    </xsl:template>  
    [TS]
    To add a  timestamp to the file name, use the variable. This gives you another  possibility to define unique file names.
    [yyyy]
    Adds the  current year in four digits to the file name
    [yy]
    Adds the  current year in two digits to the file name
    [mm]
    Adds the  current month to the file name
    [dd]
    Adds the  current day to the file name
    [hour]
    Adds the  current hour to the file name
    [min]
    Adds the  current minute to the file name
    [sec]
    Adds the  current second to the file name
    You can also combine the variables. For example file[TS]??.[hour][min].txt
    Here is a screenshot of my SLD FILO definition and from the result:
    Best regards
    Bastian
    P.S.: just in case you need to define a filename in the integration step for the store file atom, here is a screenshot:

  • All rows in a Set get updated when only one row changes

    I have a complex object, which contains a Set of child objects. If i modify one of the child objects and put the object back in the cache, coherence will issue a sql update for each of the child objects, even though only one changed.
    I'm using hibernate, and when i do this in straight hibernate, that doesn't happen, only one sql update gets issued for the row in question.
    I found this because i have a timestamp column that automatically updates when the row gets updated, but since all the child rows are updating, this timestamp gets updated as well which breaks the biz logic.
    Am i missing something? Clearly it's inefficient to issue updates on all the child rows when just one changes. Is there some way to avoid this?
    Using coherence 3.5.3.
    Thanks.

    This turned out to be an issue with POF serialization of a Date object. It was doing it incorrectly, it would get the day correct, but the HH:MM:SS would be set to the current time. Since the object had been changed, when i persisted the parent, all of the child rows would persist as well since their "modify_date" attribute had been changed. Eg, if the date in the DB was "2010-07-14 03:10:00" when i read the object in, the value would change to "2010-07-14 HH:MM:SS" where HH:MM:SS would be set to the current hours/mins/secs.
    I changed the code to use my own serialization of a Date object (just used the long) and things worked fine after that.
    Is this a known issue with pof serialization?

  • Process scheduler

    Hi,
    I created and configured process scheduler through psadmin.exe and getting error when tried to start it......
    PeopleSoft Process Scheduler Administration
    1) Start a Process Scheduler Server
    2) Stop a Process Scheduler Server
    3) Configure a Process Scheduler Server
    4) Create a Process Scheduler Server Configuration
    5) Delete a Process Scheduler Server Configuration
    6) Edit a Process Scheduler Configuration File
    7) Import an existing Process Scheduler Configuration
    8) Show Status of a Process Scheduler Server
    9) Kill a Process Scheduler Server
    10) Clean IPC resources of a Process Scheduler Domain
    q) Quit
    Command to execute (1-10, q) : 1
    Database list:
    1) HC
    Select item number to start: 1
    No Archive subdirectory, creating it...
    No psprcs.cfg in the Archive subdirectory, creating it...
    Installing PeopleSoft ODBC driver and Crystal libraries ...
    PeopleSoft ODBC Driver installed.
    Registering nVision...
    PeopleSoft nVision registered.
    Starting Process Scheduler Server PSNT for Database HC ...
    Booting all admin and server processes in C:\PT8.49\appserv\prcs\HC\PSTUXCFG
    INFO: BEA Tuxedo, Version 9.1, 32-bit, Patch Level 036
    INFO: Serial #: 650522264137-2065448083901, Expiration NONE, Maxusers 1000000
    INFO: Licensed to: Oracle-Peoplesoft-ISV
    Booting admin processes ...
    exec BBL -A :
    process id=3280 ... Started.
    Booting server processes ...
    exec PSMSTPRC -A -- -C psprcs.cfg -CD HC -PS PSNT -A start -S PSMSTPRC :
    CMDTUX_CAT:1685: ERROR: Application initialization failure
    tmboot: CMDTUX_CAT:827: ERROR: Fatal error encountered; initiating user error ha
    ndler
    tmshutdown -y
    Shutting down all admin and server processes in C:\PT8.49\appserv\prcs\HC\PSTUXC
    FG
    Shutting down server processes ...
    Shutting down admin processes ...
    Server Id = 0 Group Id = VIPUL-187A83D08 Machine = VIPUL-187A83D08:
    shutdown succeeded
    1 process stopped.
    thanks in advance
    Vipul

    PT = 8.49
    OS = Win 2003
    Logs under "%PS_HOME%/appserv/prcs/HC directory"
    *1)- file name = MSTRSCHDLR_1207.LOG*
    PSMSTPRC.2388 (0) [12/07/09 18:23:45](0) PeopleTools Release 8.49 (WinX86) starting
    PSMSTPRC.2388 (0) [12/07/09 18:23:45](0) Cache Directory being used: C:\PT8.49\appserv\prcs\HC\CACHE\CACHE\PSMSTPRC_102\
    PSMSTPRC.2388 (0) [12/07/09 18:23:45](0) Server failed to start
    *2)- file name = TUXLOG.120709*
    181957.VIPUL-187A83D08!tmloadcf.3912.1200.-2: 12-07-2009: Tuxedo Version 9.1, 32-bit
    181957.VIPUL-187A83D08!tmloadcf.3912.1200.-2: CMDTUX_CAT:879: INFO: A new file system has been created. (size = 880 512-byte blocks)
    182003.VIPUL-187A83D08!tmloadcf.3912.1200.-2: CMDTUX_CAT:871: INFO: TUXCONFIG file C:\PT8.49\appserv\prcs\HC\PSTUXCFG has been created
    182246.VIPUL-187A83D08!tmloadcf.3536.2376.-2: 12-07-2009: Tuxedo Version 9.1, 32-bit
    182246.VIPUL-187A83D08!tmloadcf.3536.2376.-2: CMDTUX_CAT:879: INFO: A new file system has been created. (size = 880 512-byte blocks)
    182252.VIPUL-187A83D08!tmloadcf.3536.2376.-2: CMDTUX_CAT:871: INFO: TUXCONFIG file C:\PT8.49\appserv\prcs\HC\PSTUXCFG has been created
    182345.VIPUL-187A83D08!BBL.2052.3804.0: 12-07-2009: Tuxedo Version 9.1, 32-bit, Patch Level 036
    182345.VIPUL-187A83D08!BBL.2052.3804.0: LIBTUX_CAT:262: INFO: Standard main starting
    182345.VIPUL-187A83D08!PSMSTPRC.2388.892.-2: 12-07-2009: Tuxedo Version 9.1, 32-bit
    182345.VIPUL-187A83D08!PSMSTPRC.2388.892.-2: LIBTUX_CAT:262: INFO: Standard main starting
    182345.VIPUL-187A83D08!PSMSTPRC.2388.892.-2: LIBTUX_CAT:250: ERROR: tpsvrinit() failed
    182345.VIPUL-187A83D08!tmboot.2556.3812.-2: 12-07-2009: Tuxedo Version 9.1, 32-bit
    182345.VIPUL-187A83D08!tmboot.2556.3812.-2: tmboot: CMDTUX_CAT:827: ERROR: Fatal error encountered; initiating user error handler
    182348.VIPUL-187A83D08!BBL.2052.3804.0: CMDTUX_CAT:26: INFO: The BBL is exiting system
    File name = PSPRCS.CFG
    [Startup]
    ;=========================================================================
    ; Database Signon settings
    ;=========================================================================
    DBName=HC
    DBType=MICROSFT
    UserId=PS
    UserPswd=sxaYMM0Crai26F3R14m0+JWdoXJsSHVovUxlKDaxFDM=
    ConnectId=people
    ConnectPswd=kyD3QPxnrag=
    ServerName=PSNT
    [Database Options]
    ;=========================================================================
    ; Database-specific configuration options
    ;=========================================================================
    ; Please see Chapter "Tuning and Administration", in
    ; Sybase Installation and Administration Guide for details
    SybasePacketSize=512
    ; Please see Chapter "Tuning and Administration", in
    ; Oracle Installation and Administration Guide for details
    UseLocalOracleDB=0
    ;ORACLE_SID=
    OracleDisableFirstRowsHint=0
    ; Dynamic change allowed for EnableDBMonitoring (PSAESRV Only)
    EnableDBMonitoring=1
    [Trace]
    ;=========================================================================
    ; Trace settings
    ;=========================================================================
    ; PeopleTools trace file (NT only, ignored on UNIX)
    TraceFile=%PS_SERVDIR%\logs\PeopleTools.trc
    ; SQL Tracing Bitfield
    ; Bit Type of tracing
    ; 1 - SQL statements
    ; 2 - SQL statement variables
    ; 4 - SQL connect, disconnect, commit and rollback
    ; 8 - Row Fetch (indicates that it occurred, not data)
    ; 16 - All other API calls except ssb
    ; 32 - Set Select Buffers (identifies the attributes of columns
    ; to be selected).
    ; 64 - Database API specific calls
    ; 128 - COBOL statement timings
    ; 256 - Sybase Bind information
    ; 512 - Sybase Fetch information
    ; 1024 - SQL Informational Trace
    ; Dynamic change allowed for TraceSql and TraceSqlMask
    TraceSQL=0
    ; PeopleCode Tracing Bitfield
    ; Bit Type of tracing
    ; 1 - Trace Evaluator instructions (not recommended)
    ; 2 - List Evaluator program (not recommended)
    ; 4 - Show assignments to variables
    ; 8 - Show fetched values
    ; 16 - Show stack
    ; 64 - Trace start of programs
    ; 128 - Trace external function calls
    ; 256 - Trace internal function calls
    ; 512 - Show parameter values
    ; 1024 - Show function return value
    ; 2048 - Trace each statement in program (recommended)
    ; Dynamic change allowed for TracePC
    TracePC=0
    ; AE Tracing Bitfield
    ; Bit Type of tracing
    ; 1 - Trace STEP execution sequence to AET file
    ; 2 - Trace Application SQL statements to AET file
    ; 4 - Trace Dedicated Temp Table Allocation to AET file
    ; 8 - not yet allocated
    ; 16 - not yet allocated
    ; 32 - not yet allocated
    ; 64 - not yet allocated
    ; 128 - Timings Report to AET file
    ; 256 - Method/BuiltIn detail instead of summary in AET Timings Report
    ; 512 - not yet allocated
    ; 1024 - Timings Report to tables
    ; 2048 - DB optimizer trace to file
    ; 4096 - DB optimizer trace to tables
    TraceAE=0
    ; Performance Monitor Tracing Bitfield
    ; Bit Type of tracing
    ; 1 - Trace All performance monitor agent activity
    TracePPM=0
    [Process Scheduler]
    ;=========================================================================
    ; General settings for the Process Scheduler
    ;=========================================================================
    PrcsServerName=PSNT
    DBBIN=c:\Program Files\Microsoft SQL Server\80\Tools\Binn
    ; Max number of attempt to try reconnect to the database when the connection
    ; is lost
    Max Reconnect Attempt=12
    ; Interval in seconds between attempts to reconnect
    Reconnection Interval=300
    ; This parameter indicates the duration in minutes allotted before
    ; Tools' security module will timeout authenticating a process released
    ; by Process Scheduler. The timer starts from the time Process Scheduler
    ; initiates the request
    Authentication Timeout=5
    ; This allows for dynamic changes to certain setting without having to reboot
    ; the domain. The settings that can be dynamically changed are: Recycle Count,
    ; Consecutive Service failures, Trace SQL, Trace Mask SQL, TracePC,
    ; Log Fence, Enable DB Monitoring, and Enable Debugging.
    ; These settings are further identified by the "Dynamic change allowed for .."
    ; comment.
    Allow Dynamic Changes=N
    Log/Output Directory=C:\PT8.49\appserv\prcs\HC\log_output
    ; Log/Output Directory Extension Option
    ;An optional subdirectory structure that can be appended to the
    ;designated Log/Output Directory.
    ;Additional meta-string that can be used include
    ;Userid: %OPRID%
    ;Contentid: %REPORTID%
    ;Process Instance: %PRCSINSTANCE%
    ;Database Name: %DBNAME%
    ;Process Name: %PRCSNAME%
    ;Process Type: %PRCSTYPE%
    ;Scheduler Server Name: %SERVER%
    ;Current Date: %CURRDATE%
    ;Current Hour: %CURRHOUR%
    ;Job Name: %JOBNAME%
    ;Job Instance: %JOBINSTANCE%
    ; As an example for usage, %CURRDATE%\%CURRHOUR%
    Output Directory Optional Extension=
    ; Logging detail level
    ; Level Type of information
    ; -100 - Suppress logging
    ; 0 - Status information
    ; 1 - Critical Information
    ; 2 - Errors
    ; 3 - Informational (default)
    ; 4 - Tracing Level 1
    ; 5 - Tracing Level 2
    ; Dynamic change allowed for LogFence
    LogFence=3

  • Data missing in reporting views

    Hi,
    As you can see below in the query, I am trying to report on hourly data (say 9:00 am, 10:00 am, 11:am , 12 pm) of current date time...I am finding data only in the CURRENT and DAILY views (whereas the DETAILS and HOURLY views are empty).
    Where do I get the hourly information (not just current hour but for a window of 5-6 hrs from current time) ?
    --25 hour period value for Read and write (Disk I/O)
    --Details view
    SELECT DISTINCT
      A.TARGET_NAME,
      A.TARGET_TYPE,
      A.COLLECTION_TIMESTAMP,
      sum(A.VALUE) AS READ_VALUE,
      sum(B.VALUE) AS WRITE_VALUE
      --A.KEY_VALUE 
    FROM
      OEM_COPY.MGMT$METRIC_DETAILS A,
      OEM_COPY.MGMT$METRIC_DETAILS B 
    WHERE
           A.TARGET_TYPE = B.TARGET_TYPE
       AND A.TARGET_NAME = B.TARGET_NAME
       AND A.TARGET_GUID = B.TARGET_GUID
       AND A.METRIC_LABEL = B.METRIC_LABEL
       AND TO_CHAR(A.collection_timestamp,'MM/DD/YYYY HH24') = TO_CHAR(B.collection_timestamp,'MM/DD/YYYY HH24')
       AND A.KEY_VALUE = B.KEY_VALUE
       AND A.METRIC_LABEL  In  ( 'Database Files'  )
       AND A.METRIC_COLUMN  In  ( 'write_cs'  )
       AND B.METRIC_COLUMN  In  ( 'read_cs'  )
       AND A.TARGET_TYPE  In  ( 'oracle_database'  )
       AND A.TARGET_NAME IN ('phadmdv')  
    GROUP BY
      A.TARGET_NAME,
      A.TARGET_TYPE,
      A.COLLECTION_TIMESTAMP
    ORDER BY
      A.TARGET_NAME,
      A.TARGET_TYPE,
      A.COLLECTION_TIMESTAMP
    --Current value for Read and write (Disk I/O)
    --From hourly table (empty)
    SELECT DISTINCT
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMP,
      sum(C.KEY_VALUE) AS READ_VALUE,
      sum(B.KEY_VALUE) AS WRITE_VALUE
      --A.KEY_VALUE 
    FROM
      OEM_COPY.MGMT$METRIC_HOURLY C,
      OEM_COPY.MGMT$METRIC_HOURLY B 
    WHERE
           C.TARGET_TYPE = B.TARGET_TYPE
       AND C.TARGET_NAME = B.TARGET_NAME
       AND C.TARGET_GUID = B.TARGET_GUID
       AND C.METRIC_LABEL = B.METRIC_LABEL
       AND TO_CHAR(C.ROLLUP_TIMESTAMP,'MM/DD/YYYY HH24') = TO_CHAR(B.ROLLUP_TIMESTAMP,'MM/DD/YYYY HH24')
       AND C.KEY_VALUE = B.KEY_VALUE
       AND C.METRIC_LABEL  In  ( 'Database Files'  )
       AND C.METRIC_COLUMN  In  ( 'write_cs'  )
       AND B.METRIC_COLUMN  In  ( 'read_cs'  )
       AND C.TARGET_TYPE  In  ( 'oracle_database'  )
       AND C.TARGET_NAME IN ('phadmdv')
    GROUP BY
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMP
    ORDER BY
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMP
    --Current value for Read and write (Disk I/O)
    --From daily table (ONLY Daily averages)
    SELECT DISTINCT
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMP,
      sum(C.AVERAGE) AS READ_VALUE,
      sum(B.AVERAGE) AS WRITE_VALUE
      --A.KEY_VALUE 
    FROM
      OEM_COPY.MGMT$METRIC_DAILY C,
      OEM_COPY.MGMT$METRIC_DAILY B 
    WHERE
           C.TARGET_TYPE = B.TARGET_TYPE
       AND C.TARGET_NAME = B.TARGET_NAME
       AND C.TARGET_GUID = B.TARGET_GUID
       AND C.METRIC_LABEL = B.METRIC_LABEL
       AND TO_CHAR(C.ROLLUP_TIMESTAMP,'MM/DD/YYYY HH24') = TO_CHAR(B.ROLLUP_TIMESTAMP,'MM/DD/YYYY HH24')
       AND C.KEY_VALUE = B.KEY_VALUE
       AND C.METRIC_LABEL  In  ( 'Database Files'  )
       AND C.METRIC_COLUMN  In  ( 'write_cs'  )
       AND B.METRIC_COLUMN  In  ( 'read_cs'  )
       AND C.TARGET_TYPE  In  ( 'oracle_database'  )
       AND C.TARGET_NAME IN ('phadmdv')
    GROUP BY
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMP
    ORDER BY
      C.TARGET_NAME,
      C.TARGET_TYPE,
      C.ROLLUP_TIMESTAMPThank you

    I dont understand. what you say
    you say that these query not returns rows and you need to know in what mgmt table is stored the mentioned information

Maybe you are looking for

  • File Upload demo problem

    Hi!, i have a problem with the File Upload Demo when it calls this line: hDirectoryObject := JFile.new(directory); and the error is: error 6508 "PL/SQL: could not find program unit being called" That's ok, but anybody knows why should the program cou

  • How to use dll in Labview ?

    I compile this code to dll file with VC++2010 filename is test_dll.dll . #include "stdafx.h" #include <iostream> #include <Windows.h> using namespace std; int main(int a){     cout << "Test dll...............\n";     return a; After that, I put Call

  • Spry MenuBarHorizontal not working in IE7

    Hi, I'm new and this is my first post. I cannot get the Spry Horizontal Menu Bar to work in IE. http://educationaltools.org/codnew/default.html Please help! Thank you! Lisa --UPDATE-- I  updated to Spry Prerelease 1.6.1 and it seems to be working. No

  • E75 How to disable power save or light time out?

    Hi, I want to disbale either the power save or change the light time out setting, but I can do neither? Can anyone assist? Thanks

  • Slideshow only plays first song in 3 song playlist

    I created a playlist in iTunes for my slideshow. But the iPhoto slideshow only plays the first song in the list over and over again, even if I selected a playlist of three songs when I clicked on the Music button. Using iPhoto 08 v7.1.5