Help: How to get the enddate as February28 or january 31

Hello Folks,
Am trying to get the data 2 months prior. So i was wondering how to get the enddate as 02/28/2010 or 01/31/2010.
Thanks a lot
Edited by: user11961230 on Apr 21, 2010 11:50 AM

SQL> SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-2)),'DDMONTHYYYY') dates FROM DUAL;
DATES
28FEBRUARY 2010
SQL> SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-2)),'MONTHYYYY') dates FROM DUAL;
DATES
FEBRUARY 2010
SQL> SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-3)),'DDMONTHYYYY') dates FROM DUAL;
DATES
31JANUARY  2010
SQL> SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-3)),'MONTHYYYY') dates FROM DUAL;
DATES
JANUARY  2010
SQL>

Similar Messages

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • Pls help : How to get the client ip address in EJB

    Hi experts,
    I need to find the ip addr of the client which makes the remote call.
    I tried using
    java.rmi.server.RemoteServer.getClientHost()
    But it throws ServerNotActiveException .
    When I tried this in RMI it works fine perfectly.
    If i am right EJB is just similar to RME and it should work in it too..
    Can you please help me in finding out the ip address of the client which makes the ejb call.
    Thanks & Regards,
    Mukunt

    Hi Mukunt,
    There is no portable way to do this in the Remote EJB programming model. The bean class
    is written in a way that is agnostic to those kind of plumbing-related details of the caller.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to Get the Current Workitem id at runtime

    Hi All,
    I have a scenario, where request pending with a user who has already resigned the organization. The requirement is that we need to provide a report
    of the request and with whom it is pending with along with the workitem id with a forward push button.
    So that if the user identifies that a request is pending with someone he can click the record and press for the forward button and a pop-up to be showed where he can enter the userid to whom he needs to forward it.
    In this scenario can anyone tell me how to get the current workitem id at run time and to save it to a custom table.
    I tried with method before workitem execution, but here i am not getting the current workitem id.
    Can you please suggest a good solution for this.
    Thanks and Regards,
    Balaji

    Karri,
    I think i can explain you with an example.
    Here is my Scenario.
    A user has raised a Gate pass and it went to all approval's and got approved and the material is also sent out from the plant. Lets take the date as 1.1.2013 (A Warehouse person have done the checking and sent out of the plant).
    On 1.3.2013 some of the material has been returned and a material inward request has been raised and now the warehouse person has to do a inward checking and to sent it back for the initiator for the approval, but the warehouse person has resigned the organization on 1.2.2013, now the workitem is pending with the warehouse person who has already resigned.
    My scenario is once the material inward request is created and before the workitem is delivered to the warehouse person i need to get the workitem id and to store the workitem some where.
    So that in future if any warehouse dept head wants to forward the workitem which are lying in the person inbox who has already resigned he can do it via a report using this workitem id.
    So, can anyone help how to get the dialog workitem id before the workitem creation or execution. I tried with "method before workitem execution" but my break point is not triggering at this point.
    Thanks and Regards,
    Balaji

  • IDM : How to get the Resource name in Exclude Rule during Reconciliation?

    Hi
    Problem Statement => How to get the Resource name in Exclude Rule during Reconciliation.
    Problem Description => Apparently, we use exclude rule for not consider some account during reconciliation.
    I need the resource name in exculde rule during reconciliation. I tried with getResources() method which is an inbuilt method.But it gives all the resources are aviablable in the repository (IDM). I need only the current reconcilied resource name instead of fetching all the resouce.
    Can any one please help how to get the resource name in exclude rule during reconciliation?
    Thanks in advance for you help.
    Thanks,
    Chellappan

    Hi,
    Thanks for your reply.
    I have 50 resouces and these resouces using the same kind of exclude rules. In the exclude rule, i am using resource name to do some work. If i get the resouce name in exclude rule, then i can use the same exculde rule for 50 resources. This will minimise the rule count from 50 to 1. For that, i need resouce name.
    Thanks,
    Chellappan Sampath.

  • I tunes has stopped working in windows 7 and I don't know how to get the crash information that everyone else seems to get to know what the cause is....any help?  I have a toshiba windows 7 computer.

    I have a toshiba computer and it is windows 7, recently after I installed imatch everytime I open itunes I get the message 'i tunes has stopped working' and windows cannot find a solution and has to close.  There is no solution and I don't know how to get the crash information on my computer....can anyone help as I want to finish downloading all my songs to match to be available on my mac products.

    Re: That garbage is unreadable.
    If you really want help, stop messing with the fonts and post so that others can read and offer suggestions.
    Or better yet... try a search, I'm certain you'll find a solution to whatever issue you're experiencing.
    I have found that many times it is the things that make you most angry that push you to action. This was the case here. Thank you for causing me to get so angry that I found the answer myself.

  • The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    Click on the Layout button lower right and choose a Vertical lyout from the dropdown

  • I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help

    I have a new iMac running iTunes 10.4 in OS 10.6.8, and a new Mac Air running iTunes 10.4 in Lion.  I was able to transfer all my music etc. from the iMac onto the Air, but cannot figure out how to get the Playlists from the iMac to the Air.  iTunes Help says File >Library >Export playlist and choose XML, or to save a copy of all your playlists, File > Library > Export Library, "the Exported info is saved in XML format."  Then it says, "to import an iTunes playlist, File > Library > Import Playlist".  Now I am assuming I do that import part on the Air, but when I try it doesn't recognize anything that can be imported - what am I missing??? Aside from a clue...

    Thanks, Jim, for taking the time, but the reply is unfortunately vague in the exact area of my confusion!  "you need to copy that file to your new computer..."  Well, the Import/Export instructions make it seem as if the two computers should be able to communicate this file thru wifi, but that's the linkage I can't seem tocreate with Import/Export.  Should I instead email a copy to myself (thats what applecare suggested)?  Copy it to and from a thumb drive?  But then place the file where?  And the article was helpful, but should I be trying to move the Library file or the Library.xml file (as iTunes Help suggests)?  Sorry to be so clueless about it...I suppose I buy Apple in the hopes of not having to think about this stuff, which approach seems not to be serving me well. Thanks again for your time!

  • Help!! working on a movie on Imovie. I had to delete a music file from a clip section and now there are some clips that have no audio!!! don't know how to get the audio back to my clips!!!! Help!!!

    Help!! working on a movie on Imovie. I had to delete a music file from a clip section and now there are some clips that have no audio!!! don't know how to get the audio back to my clips!!!! Help!!!

    You can use some third party software to copy the music from your old iPod back to computer first, and then import the music into iTunes and re-sync them to yournew iPod. Here is a guide about how to transfer iPod music to computer. Hope it helps. Feel free to email me if you need further help.

  • Help:how to get content of the word(.doc) attachment in a email

    help to all:
    I get the email attachment(.doc or .xls) and it's
    content,using javaMail Api .but output it on the
    computer screen,I see only some sign unreadable.
    Pls how to get the content.
    thanks for you.
    bi tan

    Save the output to a file and open it in Word/Excel thats what documents attached to mail are made for...
    If you really need the contents send them in the body or in a plain text attachment.

  • HT2602 I am stuck. I can not figure out how to get the microsoft office that is on my (admin) profile dock onto the dock for the other users on my mac. Can anyone help me out?

    I am stuck. I can not figure out how to get the microsoft office that is on my (admin) profile dock onto the dock for the other users on my mac. Can anyone help me out?

    ebony --
    So, when you open your main Applications folder, there is no Office app there?
    It's in your Users>Applications folder?

  • HT1454 HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    Try the following:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup

  • How to get the previous record value in the current record plz help me...

    In my sql how to get the previous record value...
    in table i m having the field called Date i want find the difference b/w 2nd record date value with first record date... plz any one help me to know this i m waiting for ur reply....
    Thanx in Advance
    with regards
    kotresh

    First of this not hte mysql or database forum so don;t repeate again.
    to get diff between two date in mysql use date_format() to convert them to date if they r not date type
    then use - (minus)to get diff.

  • HT1390 i rented a movie on my ipad but I am unable to download it on my ipad not enough space.  So now I would like to watch the movie on my laptop .. but i don't know how to get the movie on my computer.. help?

    I rented a movie last night on my ipad but I am unable to download it on my ipad I have no space.. so I want to watch it on my laptop computer but do not know how to get the rented movie on it.  I checked the itune store and they said I have it rented.. So I need help on what to do to download it on my computer so I can watch it any suggestions?  Thanks.

    Niel wrote:
    Because rented movies from the iTunes Store are normally a one-time download per rental, and if that download was to an iOS device, they can't be transferred to any other device.
    Does that hold in the other sense as well? A rental on the computer is non-transferrable to the iGadget?

  • I'm trying to transfer data (docs, emails) from G4 iMac running os 10.3.9 to brand new iMac on 10.8.1  I'm stuck, any help greatly appreciated.  (Ethernet or wifi networking are both options if I can figure out how to get the machines to communicate.)

    I'm trying to transfer data (docs, emails) from an old G4 iMac running OS 10.3.9 to brand new iMac on 10.8.1  I'm stuck, any help greatly appreciated.  (Ethernet or wifi networking are both options if I can figure out how to get the machines to communicate.)

    AMoriyama wrote:
    I have the old machine backed up onto an external firewire disk but can't hook that up to the new imac as I'm waiting for delivery of a firewire 400/800 adaptor - therefore starting the old machine up as a slave is also subject to the same delay.
    I was hoping there might be some way to create a network between the 2 machines (and 2 different versions of the OS) to be able to transfer data across immediately but perhaps I'll just have to wait for my firewire adaptor to arrive.
    I don't understand why you're buying a Firewire adaptor, since AFAIK both of your computers have Firewire already built in.
    All you need is a firewire cable. Connect the Firewire socket on the old machine to the Firewire socket on your new iMac.
    Then start the old machine in Target Mode (i.e. by holding down the T key on its keyboard, while it's starting up, until you see the three-legged T icon hopping around the screen of the old machine.)
    At that point you will also see a new icon on the screen of your new iMac. This is the hard drive of your old machine.  By clicking on it you can navigate through it any way you like, just as you would normally.
    Just drag across whatever you want from the old computer to the new one. This will leave everything on the old computer untouched.
    - or use Migration Assistant but in my experience, Migration Assistant isn't very reliable and fails to migrate large amounts of stuff.

Maybe you are looking for

  • Issue in Ibase creation in CRM

    Hi, In my understanding that when I download the Equipments from ECC to CRM,Installed base will automatically created in CRM with details of partner,variant configuration etc. But in our scenario we have only Material/Serial number combination and no

  • Adobe Photoshop Elements 11 compatability with windows 8?

    Hi, Can I install Adobe Photoshop Elements 11 and Premiere elements 11 if I have windows 8? i.e. is Adobe Photoshop Elements 11 compatabile with windows 8?

  • How can i change the sequence of text element in standard driver program ?

    Hi, can u tell me how can i change the sequence of text element in standard  sapscript driver program.. without making a zcopy of standard driver program. My problem is when MEDRUCK form is getting printed for PO print , header text is coming before

  • Duplicating an existing wiki

    Is there a way to create a new wiki that contains the content from a current one? I have a faculty member who wants to create a new wiki for a course, but wants it to include all the material they have already uploaded to an existing wiki.

  • I want to run single instance of my class ?

    i have a class with name Abc, i want when my Abc class is in running mode then i cant run my Abc class again untill my Abc class not exit. i want to do that in pure java, i have one logic but it is not proper salution. my logic is that when my progra