Help with a Date variable

I'm creating a jscript to automatically rename a file the current days date, but i can't figure out how to get it to put a zero in front of days/months that are single digits. Can anyone help me real quick? Heres the code i already have, pay no attention to the "dh" part, it has to be there:
var todayFileName = "dh" +
today.getFullYear() + "" +
today.getMonth() + "" +
(today.getDate()+1); + " " +

This little javascript function should help.
Note that it is only meant to work with valid dates. Putting in a -7 for the parameter will result in something not so nice :-)
function twoDigitNo(no){
    return  (no < 10) ? "0" + no : no;
  }Cheers,
evnafets

Similar Messages

  • Help with menus and variables in different classes.

    1) how do I change variables in different classes? My situation..
    I have a few tabbed panels/planes, that ask for different user inputs. I want the last tabbed panel/plane to have the inputs on 1 plane. Is that confusing?
    Code:
            JTabbedPane tp = new JTabbedPane();
            tp.addTab ("Kitchen", new KitchenPanel());
            tp.addTab ("Living Room", new LivingRoomPanel());
            tp.addTab ("Master Bedroom", new MasterBedPanel());
            tp.addTab ("Bedroom 1", new Bedroom1Panel());
            tp.addTab ("Bedroom 2", new Bedroom2Panel());
            tp.addTab ("Misc Use", new MiscPanel());
            tp.addTab ("Totals", new TotalsPanel());not the full thing obviously, but just so u see what im working with.
    2) How do popup menus work? I have a menu (File -> About | File -> How to Contact)
    I want The File->About menu item, to prompt a dialog
    The File -> How to to prompt a dialog
    Contact Menu(Not Item) to load a webpage
    thanks again for the help, and i hope its not to confusing
    Edited by: 2point2ek on May 25, 2009 9:51 PM

    It's better to think in terms of transferring data between object, rather than between classes.
    What you need is for the tab pane objects to have a reference to some common object to which the data is to be sent. This common object might be the total pane. It's generally better design to keep the data in separate objects from the presentation (in this case the totals pane), but at this stage that's probably just going to confuse you.
    The simplest way to get this reference in is to the pane objects is as a constructor argument, which the constructor of your pane objects saves in a field. As you create each pane you pass it a reference and it stores that reference for when it needs to save data.
    Then, when you click detect the action by which the user tells the program to store the data he's entered the pane class should call a method on the central data object, passing all the data from that pane. If there's a lot of it, wrap it up in an object (typically called a "data transfer object").
    The central data object would be responsible for dealing with this data, amending totals etc.. It might delegate responsibility for updating the display to a separate total pane object.

  • Need help with saving data and keeping table history for one BP

    Hi all
    I need help with this one ,
    Scenario:
    When adding a new vendor on the system the vendor is suppose to have a tax clearance certificate and it has an expiry date, so after the certificate has expired a new one is submitted by the vendor.
    So i need to know how to have SBO fullfil this requirement ?
    Hope it's clear .
    Thanks
    Bongani

    Hi
    I don't have a problem with the query that I know I've got to write , the problem is saving the tax clearance certificate and along side it , its the expiry date.
    I'm using South African localization.
    Thanks

  • Help with updating PATH variable

    I am using a T42 with WinXp pro
    I installed JAVA SDK then I tried to update my cmd window path permanently so that I don't have to typed in the full path everytime, so I followed the description:
    Microsoft Windows NT, 2000, and XP - To set the PATH permanently:
    Choose Start, Settings, Control Panel, and double-click System. On Microsoft Windows NT, select the Environment tab; on Microsoft Windows 2000 select the Advanced tab and then Environment Variables. Look for "Path" in the User Variables and System Variables. If you're not sure where to add the path, add it to the right end of the "Path" in the User Variables. A typical value for PATH is:
    C:\j2sdk1.4.2_<version>\bin
    Capitalization doesn't matter. Click "Set", "OK" or "Apply".
    The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a Java SDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to j2sdk1.4.2_<version>\bin.
    The new path takes effect in each new Command Prompt window you open after setting the PATH variable.
    The wired thing is that there is no variable named: PATH in my environmental variables, so I added a new one, and it did not work, the one that I always get when I do run-> cmd is
    c:\> documents and settings\my user name
    which I found out is the so called"HOMEPATH", and it is not seen in the environmental variables tab.
    How can I change it permanetly? Please help me

    then I run cmd again, I still get
    C:\Documents and Settings\user>set path
    Path=C:\JAVA\j2sdk1.4.0\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WS
    ;.pyo;.pyc;.py;.pyw
    It did not seem to help. The path variable that cmd
    uses remained the same.In Reply #2, you said the set path shows "Path=C:\WINDOWS\System32" Now you say "Path=C:\JAVA\j2sdk1.4.0\bin" That makes it look like changed the path. If you enter "javac" it should run. However, I recommend that you go back into the Environmental Variables and change the Path you added so it says "C:\JAVA\j2sdk1.4.0\bin;C:\WINDOWS\System32"

  • Help with calender dates

    Hello every one
    I have a table with calender dates and there is a indicator which says if it is a working day or an holiday. Is there a way I can write a procedure that will help me fill that indicator column based on the calender dates.
    My table looks something like this
    date indicator
    01/01/2011 Holiday
    01/02/2011 working day
    01/03/2011 working day
    12/31/2011 working day

    Good Friday or Easter Monday as a holiday I can't help you with that.
    here is easter both julian and gregarian
    WITH years AS (    SELECT 1989 + LEVEL yr
                         FROM DUAL
                   CONNECT BY LEVEL <= 30)
    SELECT TO_CHAR (TO_DATE (day || ' ' || month || ' ' || yr, 'DD MM YYYY'),
                    'DD MON YYYY')
              easter_day_julian,
           TO_CHAR (
              TO_DATE (day || ' ' || month || ' ' || yr, 'DD MM YYYY') + 13,
              'DD MON YYYY')
              easter_day_gregorian
      FROM (SELECT yr,
                   a,
                   b,
                   c,
                   d,
                   e,
                   FLOOR ( (d + e + 114) / 31) month,
                   MOD (d + e + 114, 31) + 1 day
              FROM (SELECT yr,
                           a,
                           b,
                           c,
                           d,
                           MOD ( ( (2 * a) + (4 * b) - d + 34), 7) e
                      FROM (SELECT yr,
                                   a,
                                   b,
                                   c,
                                   MOD ( (19 * c + 15), 30) d
                              FROM (SELECT yr,
                                           MOD (yr, 4) a,
                                           MOD (yr, 7) b,
                                           MOD (yr, 19) c
                                      FROM years))))Edited by: pollywog on Nov 24, 2010 2:06 PM

  • Need help with enhanced data source in Production system

    Hello Gurus,
    1.                  I enhanced a datasource in BW and populated the field using customer exit using CMOD function. In Dev system, i dont have much data, so I deleted the whole data and did full load.
    what shud I do in Production side, so that Delta wudnt be affected??since in production, we have millions of records, we wont do full load., what is the best way to populate the field in production after transporting the datasource to production without disturbing delta's, to reflect the new field for previous years data???
    2.  can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Thanks in advance.,
    Best Regards,
    Pavan

    Hi,
    Please see this
    1.
    see this thread
    populated the new field with historic data
    2. can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Its better not to use them in a single dimension  because one customer and take more than one material so if you have 100 customer and 1000 materials  this combination will generate a large number of records. Its always better to keep characteristic which are having 1:N relation ship in one dimensional in you  case customer and material will have an M:N type of relationship.which will result in slow performance.
    Regards,
    Ravi

  • Need help with Rollback data if there is error in Data load

    Hi All,
    We are trying to load data to Oracle 11g database. We want a trigger, procedure or something like that to rollback the data if there are errors in load. Is it possible to do rollback after all the records has been parsed ? So if we try to load 100 records and if there are 30 records with error, we want to rollback after all the 100 records are parsed.
    Please advice.

    >
    Thanks for the suggestion. I'll try that option. So currently we are only loading data that is validated and erroneous records are rejected using trigger. So we don't get any invalid data in table. But Now users are saying that all the records should be rejected if there is even one error in the data load.
    >
    I generally use a much simpler solution for such multi-stage ETL processes.
    Each table has a IS_VALID column that defaults to 'N'. Each step of the process only pulls data with the flag set to 'Y'.
    That allows me to leave data in the table but guarantee that it won't be processed by subsequent stages. Since most queries that move data from one stage to another ultimately have to read table rows (i.e. they can't just use indexes) it is not a performance issue to add a predicate such as "'AND IS_VALID = 'Y'" to the query that accesses data.
    1. add new unvalidated data - automatically flagged an invalid by default of 'N" on IS_VALID column
    2. run audit step #1 - capture the primary key/rowid of any row failing the audit.
    3. run audit steps #2 through #n - capture error row ids
    4. Final step - update the data setting IS_VALID to 'Y' only if a row passes ALL audits: that is, only if there are NO fatal errors for that row captured in the error table.
    That process also allows me to capture every single problem that any row has so that I can produce reports for the business users that show everything that is wrong with the data. There are some problems that the business wan't to ignore, others that can be fixed in the staging tables then reprocessed and others that are rejected since they must be fixed in the source system and that can take several days.
    For data that can be fixed in the staging tables the data is fixed and then the audit is rerun which will set the IS_VALID flag to 'Y' allowing those 'fixed' rows to be included in the data that feeds the next processing stage.

  • Help with setting/getting variables in app

    Hi,
    I have an application which behaves in the following manner:
    1. User logs in.
    2. User is presented with a list of projects; user clicks on a project to drill down to that project.
    3. User is presented with project information which includes 4 separate lists of tasks grouped by week. So there are tasks for the current week the user is in plus task for the 3 weeks out.
    4. User can edit talks or create new ones for each of the 4 weekly groupings.
    Given that, on the main page for a project I have set up a report and form for each of the weekly groupings. I also have an item for the project id as well as each weekly grouping id. The goal there is that when a user clicks the "create" button they can create a new task for the appropriate weekly group. However, this isn't working.
    For the first weekly group when I click "create" I'm presented with the form to fill out for the task. All of the info is there, including the correct id for that weekly group so the task gets assigned to it properly. However, when I save I get an error which says that particular id is null.
    For the next three groups when I click "create" I'm given the same thing as above but without the id for the weekly group. Even if I set it and save things I'm getting the same error.
    So, I'm wondering what I've done wrong in the app flow. Am I setting these variables too early, too late? Am I really not picking them up in spite of what I see on my screen? Have I missed some fundamentals of Apex here?
    Thanks in advance for your time and help.
    Jon

    Varad....here you go...thanks!
    0.16: A C C E P T: Request="CREATE"
    0.21: Metadata: Fetch application definition and shortcuts
    0.22: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.23: alter session set nls_language="AMERICAN"
    0.23: alter session set nls_territory="AMERICA"
    0.23: NLS: CSV charset=WE8MSWIN1252
    0.23: ...NLS: Set Decimal separator="."
    0.23: ...NLS: Set NLS Group separator=","
    0.23: ...NLS: Set date format="DD-MON-RR"
    0.23: ...Setting session time_zone to -08:00
    0.25: Fetch session state from database
    0.27: ...Check session 1196910493324671 owner
    0.27: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.27: Session: Fetch session header information
    0.27: ...Metadata: Fetch page attributes for application 120, page 18
    0.28: ...Validate item page affinity.
    0.28: ...Validate hidden_protected items.
    0.33: ...Check authorization security schemes
    0.33: Session State: Save form items and p_arg_values
    0.33: ...Session State: Save "P18_TASK_SEQ" - saving same value: ""
    0.33: ...Session State: Save "P18_WEEK_GROUP_SEQ" - saving same value: ""
    0.34: ...Session State: Saved Item "P18_DISCIPLINE_SEQ" New Value="1"
    0.34: ...Session State: Saved Item "P18_TASK_TITLE" New Value="Test"
    0.34: ...Session State: Saved Item "P18_TASK_PRIORITY" New Value="5"
    0.35: ...Session State: Saved Item "P18_PERCENTAGE_COMPLETE" New Value="25"
    0.35: ...Session State: Saved Item "P18_TASK_RISK" New Value="None"
    0.35: ...Session State: Saved Item "P18_TASK_IMPACT" New Value="None"
    0.36: ...Session State: Saved Item "P18_TASK_MITIGATION" New Value="None"
    0.36: ...Session State: Saved Item "P18_CREATED_ON" New Value="12-DEC-08"
    0.37: ...Session State: Saved Item "P18_CREATED_BY" New Value="jwynacht"
    0.37: ...Session State: Save "P18_CREATED_FROM_TASK_SEQ" - saving same value: ""
    0.37: ...Session State: Saved Item "P18_LAST_MODIFIED_ON" New Value="12-DEC-08"
    0.37: ...Session State: Saved Item "P18_LAST_MODIFIED_BY" New Value="jwynacht"
    0.38: ...Session State: Saved Item "P18_DELETE_FLAG" New Value="0"
    0.38: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.38: Branch point: BEFORE_COMPUTATION
    0.38: Computation point: AFTER_SUBMIT
    0.38: ...Evaluate condition "PLSQL_EXPRESSION" for computation of item: P18_WEEK_GROUP_SEQ
    0.39: Tabs: Perform Branching for Tab Requests
    0.39: Branch point: BEFORE_VALIDATION
    0.39: Perform validations:
    0.40: ...Item Not Null Validation: P18_WEEK_GROUP_SEQ
    0.40: ...Validation did NOT pass
    0.40: ...Item Not Null Validation: P18_DISCIPLINE_SEQ
    0.40: ...Item Not Null Validation: P18_TASK_TITLE
    0.40: ...Item Not Null Validation: P18_TASK_PRIORITY
    0.40: ...Item Not Null Validation: P18_CREATED_ON
    0.40: ...Item Not Null Validation: P18_CREATED_BY
    0.40: ...Item Not Null Validation: P18_LAST_MODIFIED_ON
    0.40: ...Item Not Null Validation: P18_LAST_MODIFIED_BY
    0.40: ...Item Not Null Validation: P18_DELETE_FLAG
    0.41: ...Inline validation error count = 1
    0.41: Show current page with inline validations
    0.42:
    0.42: S H O W: application="120" page="18" workspace="" request="" session="1196910493324671"
    0.43: NLS: Language=en-us
    0.43: Application 120, Authentication: CUSTOM2, Page Template: 2370905300761909
    0.43: ...Session ID 1196910493324671 can be used
    0.43: ...Application session: 1196910493324671, user=JWYNACHT
    0.43: ...Determine if user "APEX_JON" workspace "995216593441806" can develop application "120" in workspace "995216593441806"
    0.44: ...Metadata: Fetch page attributes for application 120, page 18
    0.44: Branch point: BEFORE_HEADER
    0.44: Fetch application meta data
    0.46: Computation point: BEFORE_HEADER
    0.46: Processing point: BEFORE_HEADER
    0.47: ...Recompute field lables for fields in error.
    0.48: Show page template header
    0.53: Computation point: AFTER_HEADER
    0.53: Processing point: AFTER_HEADER
    0.53: ......Do not perform process because inline validation condition found.
    0.53: ...Do not run process "Fetch Row from TASK", process point=AFTER_HEADER, condition type=, when button pressed=
    JWYNACHTLogout
    1 error has occurred
    Week Group Seq must have some value.
    0.53: Computation point: BEFORE_BOX_BODY
    0.53: Processing point: BEFORE_BOX_BODY
    0.53: Region: Task
    Task          
    Cancel
    Create
    0.55: Item: P18_TASK_SEQ HIDDEN_PROTECTED
    0.57: Item: P18_WEEK_GROUP_SEQ TEXT
    Week Group Seq
    Week Group Seq must have some value.     
    0.57: Item: P18_DISCIPLINE_SEQ TEXT
    Discipline Seq     
    0.58: Item: P18_TASK_TITLE TEXT
    Title     
    0.58: Item: P18_TASK_PRIORITY TEXT
    Priority     
    0.58: Item: P18_PERCENTAGE_COMPLETE TEXT
    %Complete     
    0.59: Item: P18_TASK_RISK TEXTAREA
    Risk     
    0.59: Item: P18_TASK_IMPACT TEXTAREA
    Impact     
    0.59: Item: P18_TASK_MITIGATION TEXTAREA
    Mitigation     
    0.59: Item: P18_CREATED_ON TEXT
    Created On     
    0.60: Item: P18_CREATED_BY TEXT
    Created By     
    0.60: Item: P18_CREATED_FROM_TASK_SEQ TEXT
    Created From Task Seq     
    0.61: Item: P18_LAST_MODIFIED_ON TEXT
    Last Modified On     
    0.61: Item: P18_LAST_MODIFIED_BY TEXT
    Last Modified By     
    0.62: Item: P18_DELETE_FLAG TEXT
    Delete Flag     
    0.62: Computation point: AFTER_BOX_BODY
    0.62: Processing point: AFTER_BOX_BODY
    0.62: Computation point: BEFORE_FOOTER
    0.62: Processing point: BEFORE_FOOTER
    0.62: Show page tempate footer
    Home
    Application 120
    Edit Page 18
    Create
    Session
    Activity
    No Debug
    Show Edit Links
    0.63: Computation point: AFTER_FOOTER
    0.63: Processing point: AFTER_FOOTER
    0.63: Log Activity:
    0.63: Execute Count=0
    0.63: End Show:

  • Help with php session variables

    I am using Dreamweaver 8 to set up a dynamic app with PHP and
    MySQL. I want the code that the user logs in with ('UPN') to be
    stored as a session variable so that recordsets on subsequent pages
    can be set to display personalised data.
    I have set the session variable like this: $_SESSION['UPN'] =
    'UPN' (UPN is the name of the form textfield, also set as the
    username for logging in)
    On the data page, I have called the variable like this:
    $query_Recordset1 = ("SELECT pupils.pupilID, pupils.UPN,
    pupils.forename, pupils.surname FROM pupils WHERE UPN = '" .
    $_SESSION['UPN'] . "'");
    The recordset returns nothing- the dynamic table returns ony
    the column headings (both as headings and immediately under where
    you would expect the data to be).
    Can anyone help?
    Thanks

    On Wed, 17 Oct 2007 11:43:04 +0000 (UTC), "denman"
    <[email protected]> wrote:
    > I have set the session variable like this:
    $_SESSION['UPN'] = 'UPN' (UPN is
    >the name of the form textfield, also set as the username
    for logging in)
    Your code assigns the literal string UPN to the session
    variable. If
    it's coming from POSTed form data, you'd need to do it like:
    $_SESSION['UPN'] = $_POST['UPN'];
    Gary

  • Help with Inconsistent data from NI6211

    I'm not getting very far with establishing good data transfer from an NI 6211 and don't seem to be able to pin point the issue or get confidence from DasyLab V10 to be able to look for the problem in another area.
    The NI6211 is set for period measurement and automatically uses a low frequency counter with sample on demand. The measurement range is set for 200ms to 1ms
    The Dasylab Counter Input task displays the sample on demand and block size of "1".
    I have also selected "10" as an output after timeout of 5seconds.
    I have set the module to use the Dasylab timebase and have configured all 3 timebases for 1000Hz and (tried higher and lower values) and set block sizes to 1.
    Whenever I change the timebase setting I always carry out a synchronise with MAX.
    I have been writing to a file using time deducted from data.
    With these settings I have the value "10" generated and stored in the file.
    When it says "Output after timeout (s) of:", does this mean that their has been no communication for 5seconds even though I can get time stamp information indicating only a few milliseconds have passed?
    Does time deducted information mean time deduced information (ie. time stamp from the data)
    Is there anything I need to do with A/D window? I have changed the sampling rate in there but it only appears to change the driver setting.
    Any help much appreciated.
    Thanks
    Mark..

    Additional to information in above post, the operating system is Windows Vista Home Premium with Service Pack 1.
    Could this be the underlying issue, Dasylab and Windows Vista are untested?
    Thanks

  • Help with exporting data from pdf form

    I have about 100 pdf forms that I created in adobe forms central and distributed as a pdf form (rather than on the web). I am trying to export the data into a spreadsheet but when I export it, the fields are all jumbled in the csv file, as in they are not in the same order. I need to export the data all together so I'm going to the forms menu and selecting "manage form data" and then selecting "merge data files into spreadsheet". I tried exporting a single file but that gave me something really weird.
    Please help, I have a deadline next week to analyze this data and can't make sense of it once it is exported to a spreadsheet.

    Would you please share your form with me and send me one of your pdf forms and some of the csv files?
    You can share your form by doing the following:
    1. Click on the “Share” icon on the bottom left corner.
    2. Click on “Add Collaborator” on the popup menu.
    3. Enter [email protected] under “People to share with”.
    4. Set subject to "Export data from pdf form"
    5. Click the “Share” button on the bottom right of the dialog.
    Thanks
    Ken

  • Help with multiple date percentage report

    Dear all,
    I am having problems with getting percentage right on my report which is set to YTD however I am counting records for Last 5 days, Last 4 weeks and Current Date.
    I am getting the records perfectly right as I have created 3 different Groups for them. The Running Totals are counting the correct number of records.
    As I have two Running totals for each job (Credit Job + Free of Charge Job), these two jobs are getting added up in the report.
    For example
    YTD formula
    Running total of Credit Job + Running Total of Free of Charge Job = Total Jobs
    Last 5 Days formula
    Running total of Credit Job + Running Total of Free of Charge Job = Total Jobs
    Last 4 Weeks formula
    Running total of Credit Job + Running Total of Free of Charge Job = Total Jobs
    Current Date formula
    Running total of Credit Job + Running Total of Free of Charge Job = Total Jobs
    To get the grand total of these records, I have created another formula which counts all the above YTD records, L5D records and displays them in the report footer. Grand Total is showing up correctly.
    Now, What I want is the percentage of each record, i.e. the percentage of YTD records, L5D records etc.
    I have created a formula which counts the percentage but incorrectly.
    Here is the formula
    Whileprintingrecords;
    Numbervar b:=0;
    numbervar n:=0;
    numbervar m:=0;
    b:={@TotalJobsFOCRL5D}; // this is total job, (Credit+Free of charge jobs)
    n:={@TotalJobsFOCRL5DGT}; //GT is the grand total showing in report footer
    If b=0 then 0 else //if total jobs = 0 then answer is 0
    m:=(b/n)*100; // divide total jobs with grand total
    totext(m,2)+"%"; //show as percentage
    This formula does show the percentage but divides each job by itself. So if Total Jobs = 9 then it shows 100% whereas Grand Total is 479.
    Could someone please help me getting the correct percentage.
    The percentage formula is placed on the respective group footer.
    Regards
    Jehanzeb

    closing no reply

  • Need help with converting date format to decimal in SSRS expression.

    Hi all,
    I have a decimal data type column with a record in the following format 20150219 --> yyyyMMdd. And I am trying to convert the return value from SSRS date/time parameter to a decimal value.
    The TMDTOP column is the decimal data type with date records in yyyyMMdd format.
    My return parameter is the following:
    =IIf(IsNothing(Parameters!SystemDate.Value),Fields!TMDTSY.Value,CDec(Format(Parameters!SystemDate.Value,"yyyyMMdd"))) 
    When I try to run the report I get the following error:
    Failed to evaluate the FilterValue of the DataSet ‘DataSet1’. (rsFilterEvaluationError)
    I appreciate if anyone can help me on solving this problem.
    Thanks in advance.

    why casting date to decimal here? Can you explain?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Need help with recovering data from a truecrypt HDD

    I have done something stupid, I have run fdisk on my truecrypt hdd by mistake, and created 2 new partition. the 1st one on 67mb and the 2sd for the rest of the hdd.
    Can someone plz help me with restoring the data? I am not really sure there to begin.

    Get testdisk.  I use Parted Magic to recover partitions with Testdisk.  So long as you can decrypt the resurrected partitions AND provided you have NOT written to those two partitions after they were fdisk'ed you should be able to recover from this mess.  I really recommend PartedMagic for this sort of thing only because it has a good interface and a lot of other tools in one place.
    Testdisk isn't hard to use and there are mini-tutorials out there if you're really stuck such as these links from our wiki:
    Testdisk and Photorec

  • Please help with: A date split into 3 Combo Boxes ....

    Can someone help me with this Please?
    I have a date for a Date of Birth i.e. dd/MM/yyyy
    I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
    This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
    can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
    Thanks
    Craig
    // List days
      private void DayOfTheMonth(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 1; index < highNumber; index++) {
          comboBox.addItem(String.valueOf(index));
      private void DaySpecificComboBox()
        DayOfTheMonth( 32, DayjComboBox);
    // List Months
      private void Month(){
        MonthjComboBox.addItem("");
        MonthjComboBox.addItem("January");
        MonthjComboBox.addItem("February");
        MonthjComboBox.addItem("March");
        MonthjComboBox.addItem("April");
        MonthjComboBox.addItem("May");
        MonthjComboBox.addItem("June");
        MonthjComboBox.addItem("July");
        MonthjComboBox.addItem("August");
        MonthjComboBox.addItem("September");
        MonthjComboBox.addItem("October");
        MonthjComboBox.addItem("November");
        MonthjComboBox.addItem("December");
    //List Years
      private void Year(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 2002; index > highNumber; index--) {
          comboBox.addItem(String.valueOf(index));
      private void YearSpecificComboBox()
        Year( 1900, YearjComboBox);
    private String StringFromDateFields(){
        int month =1;
        if (MonthjComboBox.getSelectedItem().equals(JANUARY))
          month = 1;
        else
          if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
            month = 2;
          else
            if (MonthjComboBox.getSelectedItem().equals(MARCH))
              month = 3;
            else
              if (MonthjComboBox.getSelectedItem().equals(APRIL))
                month = 4;
              else
                if (MonthjComboBox.getSelectedItem().equals(MAY))
                  month = 5;
                else
                  if (MonthjComboBox.getSelectedItem().equals(JUNE))
                    month = 6;
                  else
                    if (MonthjComboBox.getSelectedItem().equals(JULY))
                      month = 7;
                    else
                      if (MonthjComboBox.getSelectedItem().equals(AUGUST))
                        month = 8;
                      else
                        if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
                          month = 9;
                        else
                          if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
                            month = 10;
                          else
                            if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
                              month = 11;
                            else
                              if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
                                month = 12;
                              String
                              DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
                              return DOB;

    Thanks for your time.
    I could not get that to work ??
    I have come up with this code whitch seams to work. Thought you may like to see it
         String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
          String dob = dobxml.replace('/', ' ');
          System.out.println(dob);
          StringTokenizer tokenizer = new StringTokenizer(dob);
          String day = tokenizer.nextToken();
          String month = tokenizer.nextToken();
          String year = tokenizer.nextToken();
          System.out.println(dob);
          DayjComboBox.setSelectedItem(day);
          MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
          YearjComboBox.setSelectedItem(year);ps thankyou
    Craig

Maybe you are looking for