Getting 1st of every month

Hi all,
Can anyone suggest me a logic for the following requriment.
How to get 1st of every month with out using '-' operator?
Thanks in advance
Cheers
Nirmal

...but don't forget to convert it back to a date, and to use 4 digit years:
SQL> SELECT TO_DATE('01-'||TO_CHAR(sysdate,'MON-YYYY'),'DD-MON-YYYY') FROM DUAL;
TO_DATE('
01-JUN-06
SQL> alter session set nls_date_format='dd/mm/yyyy';
Session altered.
SQL> SELECT TO_DATE('01-'||TO_CHAR(sysdate,'MON-YYYY'),'DD-MON-YYYY') FROM DUAL;
TO_DATE('0
01/06/2006Dates and strings are not equivalent and a date does not hold any display formatting information...it is only formatted when converted to a string either explicitly by using to_char, or implicitly using the nls settings
HTH
David

Similar Messages

  • HT5622 how can I find what the charges aree to my credit card from the apple store? I get multiple charges every month and don't know what they are for...I want to cancel whatever is being charged to me...how do I do it?

    how can I find what the charges aree to my credit card from the apple store? I get multiple charges every month and don't know what they are for...I want to cancel whatever is being charged to me...how do I do it?

    Have a look at this link
    http://support.apple.com/kb/ht2727

  • Process Ch to be run on 1st monday every month

    HI Everyone,
    We have a requirement to run a PC only on 1st monday of every month.
    Request to suggest solution or abap code to raise an event if that is 1st monday of the month .
    Many thanks in advance.

    Check if this FM helps: HRVE_GET_FIRST_LAST_MONDAY
    Vishwa.

  • How to select 1st and 15th of every month

    hello,
    what is the select statement to get 1st and 15th of every month from todays date till the end of current fiscal year (sep 30th)
    ex:
    June 15th - 06/15/2008
    July 1st - 07/01/2008
    July 15th - 07/15/2008
    sep 1st - 09/01/2008
    sep 15th - 09/15/2008

    SELECT
         TO_CHAR(The_Date, 'FMMonth DdTH')
          || ' - ' || TO_CHAR(The_Date, 'MM/DD/YYYY')
    FROM
          WITH
              Months
          AS
              (SELECT Level M FROM Dual CONNECT BY Level <= 9)
          SELECT
              TO_DATE(M, 'MM')     The_Date
          FROM
              Months
          UNION ALL
          SELECT
              TO_DATE(M, 'MM') + 14     The_Date
          FROM
              Months
    WHERE
         The_Date > SysDate
    ORDER BY
         The_Date

  • How to schedule a Job on 1st Wednesday of every month

    Hi,
    I have a job script like below,
    begin
    sys.dbms_job.submit(job => :job,
    what => 'calcuate_stk;',
    next_date => to_date('18-07-2007 08:30:00', 'dd-mm-yyyy hh24:mi:ss'),
    interval => 'to_date(to_char(SYSDATE,''DD-MM-RRRR'')||'' 08:30:00'',''DD-MM-RRRR HH24:MI:SS'')+7');
    commit;
    end;
    The interval of the above job is on every week.
    But now I have to change the interval and I want to run the same job on 1st Wednesday of every month.
    Can someone suggest me possibilities.
    Thanks and regards,
    Sunil

    Or :
    SQL> select mydate, next_day(last_day(trunc(mydate)),'wednesday')+8.5/24 first_wed
      2  from (select sysdate mydate from dual union all
      3        select sysdate+30 mydate from dual union all
      4        select sysdate+15 mydate from dual union all
      5        select sysdate+95 mydate from dual );
    MYDATE              FIRST_WED
    16/07/2007 08:37:11 01/08/2007 08:30:00
    15/08/2007 08:37:11 05/09/2007 08:30:00
    31/07/2007 08:37:11 01/08/2007 08:30:00
    19/10/2007 08:37:11 07/11/2007 08:30:00So, interval should be
    'next_day(last_day(trunc(sysdate)),''wednesday'')+8.5/24'Nicolas.

  • How to get the first and the last record of every month within a time range in sql

    I am trying to get the first record and the last record of each and every month in a given date range using sql. I have a sample code
    where i have just selected everything within the date range now i have to extract the first and the last records of each and every month.
    SELECT PurOrderNum,
    OrderDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to get LASTDAY for each and every month between given dates..

    Hi Friend,
    I have a doubt,How to get LASTDAY for each and every month between given dates..
    for ex:
    My Input will be look like this
    from date = 12-01-2011
    To date = 14-04-2011
    And i need an output like
    31-01-2011
    28-02-2011
    31-03-2011
    is there any way to achieve through sql query in oracle
    Advance thanks for all helping friends

    Here's a 8i solution :
    select add_months(
             trunc(
               to_date('12-01-2011','DD-MM-YYYY')
             ,'MM'
           , rownum ) - 1 as results
    from all_objects
    where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
                                      trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
    The above two query is worked in oracle 11GActually the first query I posted is not correct.
    It should work better with
    months_between(
       trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
       trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
    )Edited by: odie_63 on 12 janv. 2011 13:53
    Edited by: odie_63 on 12 janv. 2011 14:11

  • I need an event to repeat on the 1st Thursday of every month; the only option I have is every 6th or every 8th day.

    I would like to have a repeating event on the first and third Thursday of every month. I cannot make a repeating monthly event on the same day of the week.
    Also, I keep getting an overlay on my Yahoo screen that says I must have logged out or closed another page and I need to log in when I haven't done that. Is that a Yahoo problem?

    For your repeating even, I'm assuming this is your Yahoo calendar? that isn't a Firefox issue, I suggest you try to contact yahoo.
    For the other issue, try the following:
    Update to Firefox 15. Then, [[Reset Firefox – easily fix most problems]]

  • Adobe Acrobat Pro XI 11.0.06 when I reduce file size or try to optimize, I get this error: The document could not be saved. A number is out of range. I do the exact same thing every month and it works. I did it a few days ago and it worked. I receated the

    Adobe Acrobat Pro XI 11.0.06 when I reduce file size or try to optimize, I get this error: The document could not be saved. A number is out of range. I do the exact same thing every month and it works. I did it a few days ago and it worked. I receated the pdf, I renamed it. tried to do it before I imported more pages. no go. the 16 mg pdf will normally reduce to 5 or 6

    Hi,
    Are you facing the issue with any pdf file?
    Please try updating Acrobat to 11.0.7 and check.
    You might also want to repair Acrobat and see.
    Regards,
    Rave

  • Why cannot get the LR app in Adobe creative cloud? Now LR is a trial on my laptop and I am paying every month for CC. I am desperate, becaus I didn't get the solution. Also LR mobile I cannot intall it anymore.

    I hope I get the solution now after trying days and days  I am a member of CC and I pay every month. So why there is not a good helpdesk to communicate with.

    Thans alle. I will try this Tomorrowland
    Verstuurd vanaf mijn iPhone
    Op 10 mei 2014 om 19:10 heeft Simon G E Garrett <[email protected]> het volgende geschreven:
    Why cannot get the LR app in Adobe creative cloud? Now LR is a trial on my laptop and I am paying every month for CC. I am desperate, becaus I didn't get the solution. Also LR mobile I cannot intall it anymore.
    created by Simon G E Garrett in Photoshop Lightroom - View the full discussion
    Try this:
    Go to http://prodesigntools.com/adobe-cc-direct-download-links.html and download and install LR5.4 from there.
    You MUST follow the instruction under the heading "Note: Very Important Instructions".
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6371505#6371505
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Lightroom by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How do I get Verizon to stop sending me FOUR bill envelopes every month?

    We have tried, without success, over the last 9 months, to stop Verizon from using so many trees to send us redundant bills in four separate billing envelopes each and every month.  The customer service reps keep assuring us that this will be taken care of and we'll only get one bill in one envelope.  They tell us it will take up to two billing cycles for this to take effect -- we have been told this THREE times now!!  It's just extremely frustrating to try and enact an eco-friendly change in their billing behaviors and be totally ignored.  It's also quite annoying that the customer service reps keep telling us that they'll CHANGE this behavior and it never changes.  Again, four envelopes (only one of which we need to pay our bill) arrived in the mail yesterday, three billing cycles after the last time one of Verizon's employees told us this wouldn't happen.  Have any other customers tried (in vain) to get this rectified?
    I also don't appreciate that the money I send Verizon is being used to churn out additional paper that is totally unnecessary plus they get to pay the postage on these redundant envelopes going through the mail as well.  It's madness!!
    Anyone from Verizon listening out there?

    I was just about to say the same thing tns.  I just went paperless myself and that's the simplest.  The paper bill is just a duplicate anyway of your bill that you can view on line.

  • Hey guys getting upset about how i tunes is debiting $1 from my account every month is it happening yo anybody else..i didnt buy anything from the stores...whats wrong.. they just cant debit frm my acc???

    hey guys getting upset about how i tunes is debiting $1 from my account every month is it happening yo anybody else..i didnt buy anything from the stores...whats wrong.. they just cant debit frm my acc???

    Have the same problem here... don't know what to do...

  • Giving access to the planners for the 1st 2 weeks of every month to plan

    Hi Friends
    I m implementing a BPC 7 MS rolling forecast planning.
    Now the base member of the Time Dimensionis Month.
    my requirement is ,
    A Planner will be get a  alert to at the end of every month to start the process of Monthly planning for the next month.
    And the planner will only get 2 weeks of a month to plan the quantity . After that that particular planner will not able to plan any further for that  particular month.
    In my planning application, the secured dimensions are ENTITY, CATEGORY & PRODUCT  and in the Ownership Dimension is used in the PRODUCT DIMENSION, becuase planning process is driven by the Brand.
    The same process shoud repeat for all the coming months.
    And also is there any way to automate the above process.
    Regards

    For example, your workstatus settings have the following settings:
    Entity, Time and Category are the dimensions on which workstatus is checked.
    You application is called Planning, so the table where the workstatus is maintained is dbo.tblPlanningLock.
    The table has the following columns (I don't know this by heart and have nowhere to check right now, so check on you own system!):
    - StatusCode (The code corresponding to the status column in dbo.tblStatusCode)
    - Category (The locked category member)
    - Entity (The locked entity member)
    - Time (The locked time member, for correct syntax check your own system, because i am not sure but I think you should put TimeID here from the membertable)
    - TimeName (The locked time member again, but with the memberID from the time dimension. Again you should check this in your own system as I am nog 100% sure about the syntax here and cannot check right now.)
    - Lastupdate (the date of the update. For exact syntax again check your own system)
    - Updateby (user which updated the workstatus)
    What you want to do now is to create a file to load new records into this table. This could for example be a csv file. This file can be imported using the DATAFLOW task in SQL Business Intelligence Development Studio. This csv file should have the following format (or if you want to use another you have to create a mapping to):
    (For example purposes I assumed that the code for locked is 2)
    Statuscode,Category,Entity,Time,TimeName,Lastupdate,UpdateBy
    2,BUDGET,E0001,20100100,2010.JAN,14-01-2010,DOMAINNAMEUSERNAME
    This can be done by running the package from BPC or by scheduling it on the server. There is a how to guide on how to create SSIS packages on SDN. This is the link:
    [How to Build SSIS Packages for Business Planning and Consolidation 5.0|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/2027ebee-a928-2a10-4485-b88c926f5e24|]
    This link is for 5.0 but the proces in BPC 7 is quite similar.
    Edited by: Tim Vierhout on Jan 7, 2010 4:46 PM

  • Repeating events - 1st Tuesday of every month?

    I have a lot of meetings that occur monthly (even twice monthly), for example on the 1st Tuesday, or 3rd Wednesday. There does not seem to be a function to allow this. Am I missing something? Has anyone come up with a workaround? (aside from manually entering each meeting?)
    That and an ability to categorize events, say...kids, work, home, etc

    You need to create the recurring event in Outlook and sync it. For example, if you create a meeting on the 1st Wednesday of every month, and sync it, when you go to the iPhone event, the recurrence will be set to CUSTOM (which is NOT one of the choices when you are creating an event directly on the iPhone). The event will replicate correctly onto the iPhone. Any changes to the event, however, need to be made in Outlook and synced.
    There is NO category support for events or contacts on the iPhone. Boooooo....

  • /560 net pay getting cumulated every month

    /560 net pay wage type getting cumulated every month,
    I have entered the bank details also, Please suggest some solution.
    Its urgent
    Regards
    Abhimanyu

    Is your pay frequency "monthly" ?
    It is normal that some WTs would cumulate in CRT.  Again, check the values for PrCl 03, 20 and 41 in V_512W_D.
    Regarding Bank Details, is the employee's IT0009 valid for the payroll period in question ?

Maybe you are looking for

  • Cross-Reference using Text Anchor problems

    I am having problems with creating "New Cross-Reference" using a "Text Anchor" in CS4 Indesign. I can mimic what I want using a "Link to Paragraph", selecting the paragraph style and link, and then using the "Partial paragraph and Page Number" option

  • Issues with MDL imports in OWB

    I am trying to import MDL files, some MDL's import was success when i started importing MAPPING MDL's i am getting below error, i am completly new to this OWB world,can some one help me on this issue. * Oracle Warehouse Builder Import Log File * Crea

  • My iphone 4s cannot be turned on after updated to ios 7. can anyone tell me how to solve this

    my iphone cannot be turned on after a week i updated it to ios 7. I have tried many solution to turned it on but none of them works. Now it only appear the apple logo on my screen since 5 hours ago. Can anyone suggest me the best solution

  • Rebate- Mass  settlement

    Dear Friends In my company no of customer is there with them we have make agreement of 1500. I want to do final settlement. 1. How i will do final settlement it massly 2. For final settlement we need agreement status should "B" for that how i will ch

  • About Oracle Workshop and other Oracle's development tools...

    Greetings, I'm wondering what would be the future of the Workshop IDE. Oracle also distributes JDeveloper which is the company's historical development tool for Java/J2EE. Will both tools continue to be supported ? Or rather they will merge in an uni