Need help in Logic to how to use dates

i need to generate a report using JSP where i need to get the deatials of all the employes in who have worked on a project in a particular month and the count the no of days he had worked for the project in that particular month
input will be given as november 2005
can ne one help me out plz

<%
int month=Integer.parseInt( request.getParameter("month"));
int year=Integer.parseInt(request.getParameter("year"));
int count=0;
Vector v1 =new Vector();
String From=null;
String To=null;
Calendar cal = null;
if(month == 12){
     To= month+"/01/"+year;
     year = year+1;
     From = 1+"/01/"+year;
     else
          To=month+"/"+01+"/"+year;
          month=month+1;
          From=month+"/"+01+"/"+year;
     try
     Class.forName("hi");
     Connection Con=DriverManager.getConnection("l","i","i");
     Statement St=Con.createStatement();
     String Query="select c.empid,c.empname,a.fromdate,a.todate, b.ccvalue,b.cclink from pcctrans a , pccval b,pempmast c where b.ccid = a.cc2 and a.eid = c.eid and a.fromdate < '"+From+"' and a.todate > = '"+To+"' order by b.ccvalue ";
     ResultSet rs=St.executeQuery(Query);
     while(rs.next())
     v1.add(rs.getString(1));
     v1.add(rs.getString(2));
     java.sql.Date d= rs.getDate(3);
     java.sql.Date d1= rs.getDate(4);
     cal=new GregorianCalendar(year, month, 01) ;
     if(d.getMonth()<=month && d1.getMonth()>=month)
          count=cal.getActualMaximum(cal.DAY_OF_MONTH );
     System.out.println(count);
     v1.add(d);
     v1.add(d1);
     v1.add(new Integer(count));
     v1.add(rs.getString(5));
     v1.add(rs.getString(6));
     catch(Exception e)
          e.printStackTrace();
     for(int i=0;i<v1.size();i++)
          out.println(v1.get(i));
     }

Similar Messages

  • I just got logic and need help i dont know how to make a track at all

    i just got logic and need help i dont know how to make a track at all

    Pancenter wrote:
    There was a time not too long ago when people respected the incredible amount of talent that contributed to this software...Everyone -wanted- to learn about the craft and "art" that goes into being a good engineer, musician, producer...etc.      
    Beginner's did enough reading and experimentation to at the very least, ask an intelligent question.
    pancenter-
    Hey Pancenter there are still lots of us about.
    I wouldn't take the original post too seriously - I may of course be naive but it sounds like it could be a troll to me!
    I learn a lot from reading the posts of the likes of you, Erik, Bee Jay, sampleconstruct, noeqplease etc so I hope you guys don't become too dispondent when you see posts like these.
    By the same token, I hope the Logic team continue to use their talents to develop powerful software that caters for the professional user, while allowing Garageband to continue to do its (excellent) job of providing for its market.

  • Hi - I need help. I would like to use my old iPhone 3 as an iPod for music only. Problem is that my phone is locked with a password I can't remember. I havent used the phone since I got my iPhone 4. Anyone who know how I can reset the phone to standard?

    Hi - I need help. I would like to use my old iPhone 3 as an iPod for music only. Problem is that my phone is locked with a password I can't remember. I havent used the phone since I got my iPhone 4. Anyone who know how I can reset the phone to standard installation or just get acces to the phone. There is no SIM card in the phone.

    Hi Lawrence,
    Thanks for your prompt response, however I have first seen it now. I have placed an active SIM card in the iPhone turned it off and on. It now says SIM locked, please write access code. The problem is I don't remember the password. When I connect it to iTunes it tell me that I have to write the password before it can be used with iTunes...... Do you have any good ideas? I see you are from the NYC area.... used to work there back in the early 90´   Those were good days..... What a City

  • I need help verifying the details of a used ipad mini I'm about to buy. Is this possible by just providing the serial

    I need help verifying the details of a used ipad mini I'm about to buy. Is this possible by just providing the serial

    It depends on what you mean by "verifying the details".  sberman gave you the best place to look to research the technical specifications of the device you are thinking of purchasing. If, however, you're asking how to check if the device is Activation Locked, then you can check the status here: https://www.icloud.com/activationlock/

  • Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    Can anyone help me figure out how to use my new LaCie external hard drive to import movies from my camcorder into imovie '09? I ran into so many problems last night!! Was up way past my bedtime!

    I'll stay in this chat ... I answered in the other one ... I have a Sony digital Handycam ... from years ago.  I just got the LaCie and I think I formatted it for only to be used on my Mac ... how should I go about reformatting it to be HFS Extended like you said?

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • HT1338 Need help locating where and how to update Mac OS-X 10.6.5 to the latest Mountain Lion Software...thanx John

    I need help locating where and how to update Mac OS-X to Mountain Lion.....Thanx....Jay

    First update your 10.6 version to 10.6.8 from the software update under the Apple Menu.
    This will add direct access to the Mac App store via a new application.
    Now launch the App Store from your Applications folder - Its the new icon a letter A formed from a ruler pencil and pen on a blue circle !
    Once launched you need to add your iTunes account details or create an account add payment details etc...
    Sign in purchase download and follow install processes to upgrade to 10.8 Mountain Lion.
    OH and to be safe BEFORE you install backup your current system to an external drive !

  • My ipod touch is in DFU mode 5g I need help, do not want to lose my data, please help in Spanish

    I need help, do not want to lose my data, PLEASE HELP IN SPANISH

    Una vez que el dispositivo está pidiendo ser restaurado con iTunes ... ya es demasiado tarde para salvar nada ... y usted debe continuar con la recuperación de ...
    Vea aquí> http://support.apple.com/kb/HT1808
    Es posible que tenga que probar más de una vez ... Asegúrese de seguir todos los pasos ...
    Tómese su tiempo ... Preste especial atención a los pasos 3 y 4.
    Para minimizar la pérdida ...
    Después de haber recuperado su dispositivo ...
    Re-sincronizar su contenido o restauración de la última copia de seguridad ...
    Restaurar desde copia de seguridad> http://support.apple.com/kb/ht1766
    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    To minimise loss...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • 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

  • Can u  tell me any of you how to use Date class

    Can u tell me any of you how to use Date class. Please send me the source code.

    People won't send you the source code.
    Ask specific questions. You are very vague.
    Tell me how to build.

  • Need help badly!! how can i use the front camera i...

    guys, i need help with the front camera of my device
    how can i enable the front camera of nokia N900 to shoot photos or videos,
    this problem is really bugging me...
    need help badly...

    You can't.. it is terrible..
    the only app that really uses it is mirror
    Open this link on your phone to install mirror
    http://maemo.org/downloads/product/raw/Maemo5/mirror?get_installfile
    the camera firmware is bad, so the image quality is truely terrible.. play with mirror to see.. it may be fixed in a future firmware release (it *IS* better than it was.. the firmware last year had a line through the picture!)

  • How to recover logic pro project file .Using data recoverySoftware

    Logic pro Recovery

    We need a lot more info in order to be able to help you....
    What version of Logic Pro?
    What has happened?
    Drive failure or corrupted project?
    What have you tried so far?
    Have you tried using the Selective Track Import (STI) feature in Logic to try and recover most if not all the tracks from such a project? (assuming the project is actually readable...)
    http://music.tutsplus.com/tutorials/how-to-use-selective-track-import-in-logic-p ro-9--audio-3181
    STI works much the same way in both Logic Pro 9 and LPX

  • Wish I didn't upgrade! and now I need help to figure out how to make it wor

    I have a Windows XP Pro 2nd edition with IE ver 6.0.2 (but I normally use FireFox)
    I've never had any trouble with iTunes until iTunes "forced" me to upgrade my iTunes applicaiton to version 6 if I wanted to "purchase" music. (note to self: Purchase music from stores it's much safer)...
    I upgraded and received no error messages. Trouble is now, when I launch the iTunes application it doesn't "open" ... although the iTunes process begins to run in the background process (ctraltdelete).
    I have uninstalled and installed 5 different times and ways.
    First uninstall was "typical" uninstall. THat didn't fix it.
    Second uninstall was "typical" unistall from the Control Panel, and then I removed the folders from the "program File" folder. Still wouldn't work.
    Third unintall was "typical" then I removed folders from local drive and removed all "known" registry "itune" keys. That didn't work.
    Fourth uninstall was first a "repair" to itunes, and then a "typical" uninstall, then I removed folders, removed registry (does anyone know all of itunes registry keys? Maybe I am missing a few.. the only ones I know of is the "itune" reg). Then I looked through my start up menu from "msconfig" and took a look at my firewall program to see if there was anything preventing the program from running...
    Fifth uninstall pretty much fruitless as my previous attempts.
    I know it HAS to be a registry key of some sort.. here's why:
    When I uninstall and reinstall (no matter how thourough) every time I install the iTunes program Windows XP has never ONCE recognized the new install of iTunes as a "NEW PROGRAM" and it should!
    I need help... what registry keys should I be removing? ANyone suggest for me to remove Quick Time too? What about the ipod updater software? Any connection?
    HELP??????????????????
    THanks
    W.

    hi wmchisholm!
    Trouble is now, when I launch the iTunes application it doesn't "open" ... although the iTunes process begins to run in the background process (ctraltdelete).
    hmmm. is itunes.exe persisting in Task Manager? if so, first check up on these two possibilities:
    iTunes 6 won't open on a Windows computer if firewall software is not up-to-date
    iTunes for Windows doesn't open after upgrading
    but if itunes.exe is disappearing after a few seconds, try the following technique:
    Using MSCONFIG to troubleshoot conflicts in Windows
    ... and let us know the names (exact spelling please) of the start-up items that you had to disable in order to get itunes to launch. (there's a nasty piece of malware out there that has been causing "error-less" itunes launch failures since late October.)
    love, b

  • I really need help from a human being in using the iTunes store.  4 years ago we got an audio book on learning japanese to play on the ipod.  Now the iTunes store just wants to sell me apps for the iphone or ipad.  I do not have iphone or ipad.  I want...

    Sheesh!  This old man of 70 is really lost in how to use this Apple support community or how to use the iTunes store search.  I do not even know what question to ask.
    James Gray

    Because you stated that you were looking at audiobooks that you could download to the iPod, and talking about apps only being for the iPad and iPhone and none for the iPod. So, even though the source was the iTunes store, you implied that what you were looking for needed to go on the iPod.
    Look, we are not Apple here. We are just fellow users of Apple equipment. We volunteer our time here to try to help people out with issues.
    The reason I needed to know what model of iPod you have was because you were asking about apps. However, unless you have an iPod Touch, there aren't any apps you can purchase from iTunes for it. And that was what I was trying to establish. Now that we have eliminated the option of apps from the discussion, we can focus on Audiobooks.
    As far as Audiobooks go, you can sync any audiobook that your purchase in iTunes to your Nano.
    So, as I indicated in the previous post, if you are looking for Audiobooks then go to the iTunes Store, and in the search bar in the top right-hand corner, type in "Learn Spanish Audiobooks". A list of available audiobooks to learn Spanish will display.
    Best of luck,
    GB

Maybe you are looking for

  • No NWDI activity asked while modifying the Web Dynpro java code

    Hi, We have 2 team in our project, one offshore team and one onsite team. We have NWDI also in our landscape. I have created 1 project in my local NWDS from DTR using create project  option from NWDI track , when i do any modification in that web dyn

  • Regarding identification of Material nos.

    Hi, I want to Build an Interface, transferring the Goods Receipt, Issue or Transfer Posting information from SAP to an external system. For which a program needs to be made which executes certain times a day. I have a requirement to identify the mate

  • Checking resolution in a PDF image

    This might be more of an Acrobat question, but is there an easy way to check the resolution of an image that was done in Illustrator and is now sent to you as a PDF? Thanks.

  • Quicktime wont play video ANY VIDEO and I cant fix it

    I have downloaded all of the software on the quicktime website and it still wont play any of my videos. all of my stuff has different extensions and i have tried a ton of varieties of them but still nothing. Does anyone know what i could use to fix t

  • How to get 4 first characters from a full name ?

    Hello, in my database I can choose the value Last_Name; this generates the full last name of someone. In a DECODE I would only like to get the first 4 characters of the Last_Name. How can I make this in a DECODE ? Thanks for you help. Anouk