Date Function - Holiday?

Date Function - Holiday?
==============
Hi Every body,
We have date dimension, where we need to populate the USA Holiday such as "Thanks Giving" etc. We are looking to build an holiday table for it.
Some one of this forum would have faced this situation.
We are looking to build a Holiday Table (in USA) in Oracle 11g environment.
Are there any Date function to return the holiday for input date to build this table?
If you used an alternate method, let us know.
Thanks in helping me out.

Multiple posting
Date Function - Holiday?

Similar Messages

  • Imbed Date Function????

    Hi,
    I am having trouble with a date function in Oracle Administrator. How do I make max_date a condition (for a case statement)? I am trying to return a value (a ranking) for the most recent ranking date.
    Ie:
    Case
    When Date = Max --I know you can use a Max(date) function but 
    and (another condition) --how do you make that a condition within case
    Then (return value) -- statement?
    Else 0
    End
    Is this a case where I have to import an Oracle Function? Or can I get around this by using a pre-existing function?

    Multiple posting
    Date Function - Holiday?

  • Regarding Weekend Dates and Holiday Dates - answer please

    Hi have
    Sales order date and amount sold columns in my report.
    The user requirement is they want to see all the sales that are done during the weekend and Holidays but the report should only show the
    sales order date and the amount (the weekend and holiday sale amount should roll up to the next business day total)
    lets say there was a sale on March 16th for $100, March 17th for $100 and for March 18th there is a sale of $100 the March 18th Sales amount should be $300 in the sales amount per day column.
    The orders are taken daily including the holidays and weekends and in the EBS 11 the source system the ordered date is the date the order was taken.
    In obiee 10g the reports and queries are showing all the orders that are placed on the actual day, does not matter its a holiday or weekend.
    the users does not want to see the weekend dates and holidays but they want the amount to be rolled up.
    How to convince the user that there is no capability in OBIEE 10g we cant get the orders by the calendar date.
    is there a function in obiee to roll up the weekend and holiday sales amount?
    They way Iam approaching this is
    imported the BOM_Calendar_date from EBS and doing the mappings in OWB(their ETL tool) filtering by the country USA
    and thinking about writing a function to roll the amount where the weekend holiday column is "NULL"
    if any one has any other idea please let me know.
    TIA

    How does day dim know about holidays? based on client or enterprise calendar you need to let know day dim!.
    You might have to customize day dim or else create custom table for holidays with date_wid as Jul 4 is holiday for this 20130704 is the key for that holiday and join this to day dim.
    Hope this helps, if does mark

  • About disable the cellular data function

    Hi everyone, I get a big problem...
    I have just come back to HK after my holiday. I'm really sure that I had turned off the cellular data function when I left HK.
    However, I was really surprised  when I received the bill. There is a big charge for data roaming. I have contact my mobile phone company and he replied that it is impossible to completely turn off the cellular data function of the iPhone. iPhone will get updating some data, such as weather automatically.
    is it true??
    Thx for your help!!!!

    Hi,
    This topic interests me.  Can I just confirm that navigating to Settings>General>Mobile Data and turning:
    1) Mobile Data
    2) Enable 3G
    3) Data Roaming
    to "Off" will not entirely prevent access to cellular data networks?  What if you navigated a step further to >Mobile Data Networks and simply deleted all entries, or replaced existing entries with garbage?

  • Error 91 - Trying to Use the Variant to Data Function

    I am running into a problem when trying to use variants in my application. I have a state machine set-up in that one state creates a task list (cluster of arrays) and then converts it to variant. The variant is fed into a shift register that allows me to access the task list from a different state.
    The problem comes when I try to use the Variant to Data function. I right click on the task cluster to create a constant, and then wire that to the TYPE terminal of the Variant to Data Function. I wire the task cluster variant to the VARIANT terminal. When I run the VI, i get error 91: Possible reason(s): LabVIEW: The data type of the variant is not compatible with the data type wired to the type input.".
    How can I get this error when the type I wired to the TYPE terminal of the Variant to Data terminal is a constant created from the exact type created a variant from???
    Section of the state machine where I wire the cluster to variant:
    Section of the state machine where I use the Variant to Data to get the cluster out:
    The constant wired to the Variant to Data TYPE terminal was created from the cluster that is wired to the Data to Variant. I do not understand how there can be a type mismatch???
    Solved!
    Go to Solution.

    Charles_CLA wrote:
    crossrulz wrote:
    Are there any other state that run between these two?  I am noticing you have some "Use default if unwired" tunnels comming out of your case structure.  First of all, disable that on the tunnels.  Secondly, for those cases where you are not affecting that data, wire the data straight from the input tunnel to the output tunnel.  I recommend using the linked tunnels to make it even easier on yourself.
    With the default tunnels being output, your variant coming in could really be empty, therefore the conversion fails.
    Are you stalking me today?  Every single post I've clicked comment on, you beat me by a hair!
    No, just 12 hour days (due to the holiday) get really long...and you are just slow.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Data Federator Universe Date Functions

    Hi,
    I created a Data Federator Universe from target tables (Source Tables from: Sql Server 2005 and Oracle 10g). Now, I want to create a object in the universe: "Days between 2 dates"(coming from 2 different target tables). I don't see any other date functions other than CURDATE(). How to create my object?
    Alternatively, Can I create a caliculated column in the existing target table? For Example, I want to create a new column "Days between 2 Dates" from 2 different tables by using a formula in Default mapping of the target table.
    Thanks & Regards,
    Peter

    Hi Amit,
    Thanks for your reply.
    Ok. So, Universe on top of Data Federator has limited functionality.
    And, other option you mentioned is on report level. I am creating an adhoc universe and I have few objects which will calculate days between 2 dates coming from 2 different tables.
    But, how can I achieve this on Data Federator level. I have no function there to find Days Between 2 dates. I see lot of time and date functions but not the one I required. Also, I added a column in the target table and tried to apply the formula there in the default mapping area. But, I see only the selected target table. I need another date column from another table, which is not displayed in the default mapping area.
    How can I achieve this?
    Regards,
    -Peter

  • Print a DayName without using Date functions

    Hi,
    I have an assignment like without using any date functions i should print a calendar.
    Below is the code without using any datefunctions like dateadd, datediff, datename a calendar has been generated for month and year entered. I want a week name for the dates like sunday ... monday etc. 
    I can take any date from calendar as reference  and calculate based on that date.
    ex: today is 2/20/2014 thursday . Next 7days again will be thursday, same way before 7days will be thursday.
    I need to loop in below procedure and get weekname. 
    Plz help in the code,
    I am using SQL server 2008
    IF OBJECT_ID ('dbo.Calendar1') IS NOT NULL
         DROP PROCEDURE dbo.Calendar1
    GO
    CREATE  PROCEDURE [dbo].Calendar1 --4,1991
       @month int,
       @Year  int
     AS  
     BEGIN
     declare 
     @startdateofMonthYear date,
     @EnddateofMonthYear Date
    Set @startdateofMonthYear=(Select cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'01')
    Set @EnddateofMonthYear = (SELECT case when @month IN (1,3,5,7,8,10,12) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'31'
    when @month IN(4,6,9,11) then cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+'30'
    else  cast(@Year as varchar(4)) +'-'+Right('00'+Cast(@month as varchar(2)),2) +'-'+(CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN '29' else '28' End) 
    End) 
    ;WITH CTE_DatesTable
    AS
    Select 1 daysint, Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(1 as varchar(2)) as DATE) Calendardates
    UNION ALL
    SELECT   daysint+1,Cast(SUBSTRING(cast(@startdateofMonthYear as varchar(20)),1,7) + '-'+CAST(daysint+1 as varchar(2)) as DATE) Calendardates
    FROM CTE_DatesTable
    WHERE  daysint<= 
    (SELECT case when @month IN (1,3,5,7,8,10,12) then 31
    when @month IN(4,6,9,11) then 30
    else  (CASE WHEN (@YEAR % 4 = 0 AND @YEAR % 100 <> 0) OR @YEAR % 400 = 0 THEN 29 else 28 End) 
    End)-1
    Select 
    [DWDateKey]=Calendardates,
    [DayDate]=daysint,
    [MonthNumber]=@Month,
    [MonthName]=Case when @month = 1 then 'January'
     when @month  = 2 then 'February'
     when @month  = 3 then 'March'
     when @month  = 4 then 'April'
     when @month  = 5 then 'May'
     when @month  = 6 then 'June'
     when @month  = 7 then 'July'
     when @month  = 8 then 'August'
     when @month  = 9 then 'September'
     when @month  = 10 then 'October'
     when @month  = 11 then 'November'
     when @month  = 12 then 'December' 
    End,
    [Year]=@Year
    From CTE_DatesTable
    END
    bhavana

    In the above code, where do i pass the year and month?
    (Select 2000 YearID
    Union All
    Select YearID +1 From cte where YearID <2100
     In above condition from 2000 year its displaying.
    If i want in 90's year , Day name will not be correct.
    Deepa

  • Date function doesn't work in Message Subject when scheduling batch

    Hi,
    When I was scheduling a batch and went to PDF attached E-Mail panel, in the Message Subject line I added a function <<Date(yyyy-MM-dd)>>,but when the email was sent, the date function in the subject didn't show the actual date, just showed the original function text <<Date(yyyy-MM-dd)>>, Is there anyone can help on this? Thanks in advance.

    Hi,
    Can I know the Hyperion Version you referring ?
    regards,
    Harish.

  • Date Functions( first day of a month that is 3 months from now....)

    I have recently written my first stored procedure.
    Its rather a bunch of SQL statements.
    I had to hard code lot of dates. most of them are first day of the current monthe or last day of current month etc.
    I thot of parametrizing all the dates, but if a business person has to include all the parameters they could go wrong and get the wrong results.
    Now, I want to use date functions to achieve these requirements:
    Can any one please throw some insght into this:....
    1) First day of current month,
    2) last day of current month.
    3) first day of previious month
    4) last day of previous month
    5) first day of a month that is 3 months from now.
    6) last day of a month that is 3 months from now.
    7).....
    Can any one please throw some light on any one of this.. I can try to work from there onwards ....
    Thanks a lot in advance,
    Ac

    Hi there,
    1) First day of current month
    select trunc(sysdate, 'MM') from dual;
    2) last day of current month.
    select trunc(add_months(sysdate, 1), 'MM') - 1 from dual;
    3) first day of previious month
    select trunc(add_months(sysdate, -1), 'MM') from dual;
    4) last day of previous month
    select trunc(sysdate, 'MM') - 1 from dual;
    5) first day of a month that is 3 months from now.
    select trunc(add_months(sysdate, 3), 'MM') from dual;
    6) last day of a month that is 3 months from now.
    select trunc(add_months(sysdate, 4), 'MM') - 1 from dual;cheers,
    Anthony

  • Problem overloading "set data" function on Button DataGrid Renderer

    Hi all, I'm hoping this is something simple.
    I have a class that extends mx.controls.Button and implements mx.core.IDataRenderer.  I need to set the button icon whenever the Data property is set from the DataGrid.  My problem is that my overloaded set/get Data function are never called (I've stepped through the code in debug).  Instead the set/get functions in Container.as (Flex 3.4 SDK) get called.
    Here's the basics code:
    exportButtonRenderer.as
    package controls
        import flash.events.Event;
        import flash.events.MouseEvent;
        import mx.controls.Button;   
        import mx.core.IDataRenderer;
        import mx.controls.dataGridClasses.DataGridListData;   
        import mx.controls.listClasses.BaseListData;
        import mx.events.FlexEvent;
        import mx.controls.Alert;
        import model.descriptors.compDescriptor;
        import events.exportClickedEvent;   
        public class exportButtonRenderer extends Button implements IDataRenderer   
            //    embed your icons
            [Embed(source='/assets/icons/export.png')]
            [Bindable]
            public static var imageExport:Class;
            [Embed(source='/assets/icons/blank.png')]
            [Bindable]
            public static var imageBlank:Class;
            public function exportButtonRenderer()
                super();
            private var _listData:DataGridListData;
            override public function get listData():BaseListData
                return _listData;
            override public function set listData(value:BaseListData):void
                _listData = DataGridListData(value);
            private var _data:Object;       
            override public function get data():Object
                return _data;
            override public function set data(value:Object):void
                _data = value;
            override protected function clickHandler(event:MouseEvent):void
                super.clickHandler(event);   
    Now I know I'm using the Flexlib TreeGrid and not a standard DataGrid but when I trace through all the code all code firing the set/get functions is coming from the DataGrid anyway.
    Here's the my Grid def in my main app mxml:
    Header 1
    <flexlib:TreeGrid
            id="MKTXGrid"
            dragEnabled="false" sortableColumns="false" showRoot="false"
            disclosureClosedIcon="@Embed(source='/assets/icons/arrow_right.png')"
            disclosureOpenIcon="@Embed(source='/assets/icons/arrow_down.png')"
            folderOpenIcon="@Embed(source='/assets/icons/psd.png')"
            folderClosedIcon="@Embed(source='/assets/icons/psd.png')"       
            click="MKTXGrid_clickHandler(event)"
             doubleClickEnabled="true" doubleClick="MKTXGrid_doubleClickHandler(event)" left="0" right="0" top="0" bottom="16">
        <flexlib:columns>
                <flexlib:TreeGridColumn dataField="Name" headerText = "Name" minWidth="200" width="200" editable="true"/>
                <mx:DataGridColumn dataField="ExportName" headerText = "Export Name"/>
                <mx:DataGridColumn dataField="Export" headerText = "Export" width="50" minWidth="20" resizable="false">
                 <mx:itemRenderer>
                    <mx:Component>
                        <mx:Box horizontalAlign="center" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                            <controls:exportButtonRenderer label="Export" icon="@Embed(source='assets/icons/export.png')" width="12" height="12" useHandCursor="true">                        
                                <controls:click>
                                    <![CDATA[
                                        import events.exportClickedEvent;
                                        var e:exportClickedEvent = new exportClickedEvent();
                                        e.itemData = data;
                                        dispatchEvent(e);
                                    ]]>
                                </controls:click>
                            </controls:exportButtonRenderer>
                        </mx:Box>
                    </mx:Component>
                </mx:itemRenderer>
                </mx:DataGridColumn>
            </flexlib:columns>
        </flexlib:TreeGrid>
    Nothing too special going on.
    I know this can be done, I've seen examples in the SDK:
    http://opensource.adobe.com/svn/opensource/durango/trunk/ExternalFlexTools/com/dougmccune/ containers/accordionClasses/AccordionHeader.as
    By the way I've stepped through the code of the TreeGridItemRenderer class in Flexlib which works correctly and the class def starts like this:
    TreeGridItemRenderer.as
    import flash.display.DisplayObject;
    import flash.display.InteractiveObject;
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flexlib.controls.TreeGrid;
    import mx.controls.Image;
    import mx.controls.dataGridClasses.DataGridListData;
    import mx.controls.listClasses.BaseListData;
    import mx.controls.listClasses.IDropInListItemRenderer;
    import mx.controls.listClasses.IListItemRenderer;
    import mx.core.IDataRenderer;
    import mx.core.IFlexDisplayObject;
    import mx.core.IToolTip;
    import mx.core.SpriteAsset;
    import mx.core.UIComponent;
    import mx.core.UITextField;
    import mx.events.FlexEvent;
    import mx.events.ToolTipEvent;
    import mx.events.TreeEvent;
    import mx.managers.ILayoutManagerClient;
    import mx.styles.IStyleClient;
    public class TreeGridItemRenderer extends UIComponent
                                      implements IDataRenderer,
                                                   IDropInListItemRenderer,
                                                 ILayoutManagerClient,
                                                   IListItemRenderer
    Any help would be great!

    That's because you put your component in a Box.  The DataGrid is setting the Box's .data property and no code is setting the one on your component.  You shouldn't really need Box.  You can override updateDisplayList to center your Button instead.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Help with Date function in sql query....

    My question I guess is really 2...I'm trying to use the date function as a comparison in my WHERE clause in my sql command.
    1. My date format is dd-MMM-yy eg. (01-Apr-06) ... my problem is the Apr is lower case where my field in the database is 01-APR-06 so when I compare 01-Apr-06 to 01-APR-06 is doesnt find any rows. Is there away that I can make the Apr all upper case so that it is APR.
    2. My second problem is getting this "date" field to work in my sql stmt I keep getting errors and it works fine if I take my attempts at trying to compare the date.
    --------------Date Code----------------------------------------------------------
    <%!
    String getFormattedDate(java.util.Date d)
    SimpleDateFormat simpleDate = new SimpleDateFormat("01-MMM-yy");
    return simpleDate.format(d);
    %>
    <%
    java.util.Date d = new java.util.Date();
    String dateString = getFormattedDate (d);
    %>
    ---------------------------Sql statment------------------------------------------
    ResultSet rset = stmt.executeQuery ("SELECT name " + " FROM table where rdate = '01-APR-06' order by name ");
    Currently Im just hard coding the date but I need to make it so it uses the date code...so....
    rdate should equal the date from the formatted date in upper case
    something like
    rdate = <%= dateString %>
    Thanks in advance for any ideas anyone may have...

    There are sql functions upper & lower.
    SELECT name  FROM table where upper(rdate) = '01-APR-06' order by name Or you could convert the date to a string, and use the toUpperCase & toLowerCase java.lang.String methods. It doesn't make much of a difference--do you want the java compiler to do the string conversion or the database?

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • DATE function to get name of day for a Date given?

    hi guys,
    can anyone tell me what is the DATE function to get the name of day for a date given
    (12/dec/2004)---returns SUNDAY

    Hi peter
    Your Query will return an error.
    SQL> select to_char(to_date('12/dec/2004', 'mm/mon/yyyy'), 'DAY')from dual;
    select to_char(to_date('12/dec/2004', 'mm/mon/yyyy'), 'DAY')from dual
    ERROR at line 1:
    ORA-01816: month may only be specified once.
    month is specified twice.
    select to_char(to_date('12/dec/2004', 'dd/mon/yyyy'), 'DAY')from dual;
    Regards
    Sasidhar.P

  • How to use date functions in BPEL

    Hi All,
    Is there any wayout for calculating no. of years with a given date and current date in BPEL.
    I am developing a small application where I have to calculate the years of experience of the employees. I am given with the date of joining.I want to subtract the date of joining from the current date. Is there any way-out to calculate no. of years from the given date and current date in BPEL using date functions or something else.
    Please suggest something..
    Thanks in Advance
    Roshni Shankar

    you could use something like this in xsl
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
         <xsl:output method="xml"/>
         <xsl:variable name="date1" select="xs:date('2001-01-01')"/>
         <xsl:variable name="date2" select="xs:date('2010-01-10')"/>
         <xsl:variable name="dif" select="$date2 - $date1"/>
         <xsl:template match="/">
         <all>
              <date1>
                   <xsl:value-of select="$date1"/>
              </date1>
              <date2>
                   <xsl:value-of select="$date2"/>
              </date2>
              <dif-days><xsl:value-of select="fn:days-from-duration($dif)"/></dif-days>
              <dif-years1><xsl:value-of select="fn:years-from-duration($dif)"/></dif-years1> <!-- gives 0 for me -->          
              <dif-years2><xsl:value-of select="fn:days-from-duration($dif) div 356"/></dif-years2>                    
              </all>
         </xsl:template>
    </xsl:stylesheet>

  • Date function in XSLT

    Hi All,
    I am trying to use date function in XSLT, I am using the below code, please correct me if i am wrong
    <corecom:EffectiveDate>
    <xsl:value-of select='xp20:format-dateTime(ns0:Segment-DTM/ns0:Element-373,"[YYYY][M01][D01]")'/>
    </corecom:EffectiveDate>
    Regards
    Francis

    Hi Francis,
    It doesn't seem to be anything wrong with the code itself, but what's the content of ns0:Segment-DTM/ns0:Element-373 ???
    The xp20:format-dateTime function will work if the date on the first parameter is on ISO 8601 format...
    http://www.w3.org/TR/NOTE-datetime
    Examples
    1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.
    1994-11-05T13:15:30Z corresponds to the same instant.
    Cheers,
    Vlad

Maybe you are looking for

  • Problem with Apple tv 1st gen. and Itunes display

    I am having an issue with my apple tv first generation. I had to reset it, sometimes I have to (to discuss another time) and when it came back up the movies, internet, settings options were fine, except for the music. All it displays in that option i

  • Can I track the Gps on my iPod touch through something else

    Can anyone help me? My lil girls iPod touch was stolen and I'm trying to see if there's any way I can track it?

  • Unusual permissions repair msg on Leopard

    After a couple bumpy weeks on Leopard it's finally stabilizing... but I do need to repair permissions about once per week due to sluggishness after installing new software... and the last two times I've received the same error msg: Repairing permissi

  • Tone Curve RGB does not show up

    I am using Windows 64 bit and there is no RGB choice on the tone curve. 

  • File Transfer Over Network Problem since 10.4.9 Update

    Since the update I've had this problem. Here's a typical operation: In a finder window, from my PowerMac G5, I click on Network and mount a disk from another Mac on the Network (Intel Mac Mini). I navigate to that mounted disk and drag a 1.5GB file f