Problem with update form and date (show 1970-01-01)

Hi, I've a update form (php/mysql) with many date input field. When my date is 000-00-00 I show 1970-01-01. Why??
This is the code:
label for="data_chiusura"><strong>Data chiusura</strong></label>
      <input type="text" name="Data_chiusura" value="<?php echo $string=$row_Recordset1['data_chiusura'];
    if($string == '0000-00-00'){
    $string = '';
    } else {
    $string = date("d-m-Y", strtotime($string));
    }; ?>" id="Data_chiusura">
Thanks
k

Why would the date ever be null? As long as the date has a non-zero, non-null value this function will work correctly.
I'm a little confused by what you are doing here. So, you are pulling data from a table, and populating forms with it. This particular field is a date field, and the problem is that when the data for that field is a null, you are getting instead a date of 1970-01-01 displayed in that field - is that correct? What do you want to appear there when the data is null? Nothing?

Similar Messages

  • Problem with multiple forms and subview

    I have a problem when using NetBean Web Pack (JDK6, Net Beans 5.5, JSF 1.2).
    1) I created a JSF page (hello.jsp) and a page fragment (header.jspf) inside Web Pack, and let the JSF page (hello.jsp) includes the page fragment.
    2) The include instruction is outside of the "form" element id=main_form() of the first JSF page.
    3) Inside the page fragment (header.jspf), I put a form (id=header_form) with some input fields inside the "subview" element.
    4) When running the web application, the form and its children (id=header_form) inside the subview are not rendered.
    It seems to be a problem with multiple forms on a page and the subview.
    Do I use these JSF components incorrectly? Any advice?
    Thanks

    The forms are not nested.
    hello.jsp
    <webuijsf:body ...>
    <!-- BEGIN: include header -->
    <div style="margin: 0px 0px 10px 0px; left: 0px; top: 0px">
    <jsp:directive.include file="Header.jspf"/>
    </div>
    <!-- END: include header -->
    <webuijsf:form ...>
    From above fragment, you can see the header.jspf is outside of the form element.

  • Problem with Acrobat Form and SendMail

    I have produced a PDF form and have sent it to myself (at another address) filled it in, making sure that reader rights are enabled
    (for clients with just the Acrobat Reader). I then want to send it back to myself. When clicking the submit button this is the message I get -
    The SendMail doesn't know how to talk to your default mail client. Please select a different mail application to use.
    What do I need to change for this to work?
    I am using Acrobat 8 Professional and can attach the pdf form if it helps.
    Regards
    David Would

    Hi,
    It's now June 2011 and this problem still exists..that is I am getting the error message :- The SendMail doesn't know how to talk to your default mail client.  Please select a different mail application to use.
    I am using Adobe Acrobat Pro 9.updated
    I want to use Thunderbird. Is it so unsafe?

  • Problems with Photoshop performance and data transfer speed on iMac

    Two months ago, I started noticing slow performances using Photoshop (above all using clone stamp tool) on my 27" iMac (late 2012). I did the AHT and I found that 8GB of 32GB RAM were broken.
    I removed them but the problem didn't disappered, I also noticed that data transfer speed (both copy and paste from/to internal HD and from CF card/external HD) was really slow.
    I tried many solutions suggested by Apple support, none of them worked out. At the end, I tried uninstalling and re-installing Photoshop: no more problems!!!
    10 days ago, I received a new 8GB RAM module and so I installed it back... suddenly, the problem came back, I tried re-installing again Photoshop but the problem, this time, still persist!
    Does anyone had the same experience? All other CC programs work well (LR, AE, Premiere...)

    yes, it does!
    what seems to be very strange to me is how data trasnfer speed could be affected!
    (just to say, I've already tried reset of SMC and PRAM, I've tried with different accounts and I've also re-installed the OS, next step would be formatting the disk and installing the OS from zero)

  • ORARRP Problem with Oracle Forms and Reports 10g

    hi,
    i have a problem with orarrp utility. the printeroutput is sometimes mirrored or only a blank sheet. is this a known problem? are there any workaraounds available? what can i do to fix the problem? please help me.
    thanks very much
    gunnar kieck

    Hi Rajesh,
    But i have not installed IAS at all. I have only Forms and Reports 10g and Oracle database installed. As you said it only save on IAS, but can we save it on local machine. Is there any other alternative.
    Again my second issues is --> I want to remove Mail option and rename Cache option to PDF from Destype combo box which appears at run time.
    Any idea how we can do this?

  • Problems with updating muse and illustrator

    Everytime I try and update muse it says the installer is damaged - have tried everything, restarts, waiting a few days etc.
    Then wne I tried updating illustrator I got this:
    Adobe Illustrator CS6 Update (version 16.2.1)
    There was an error downloading this update. Please quit and try again later. Error Code: U43M1D204

    seems to be working with illustrator however still have a problem with muse..
    says
    the application coudl not be installed because the installer file is damaged. Try obtaining a new installer file from the application author

  • Persistent problems with updating, uninstalling and the functioning of the setup discs.

    I am having problems with the Reader (9) and Acrobat Pro 9 aspects of my registered copy of CS4 Design Premium. When acting on the prompts from the updater, neither of these products will update, giving me a 1301? error (essentially telling me that i have modified the content of the folders?????) This is rubbish. I then decided to uninstall Acrobat 9 Pro and reinstall from the startup disc, well I was wrong, That refuses to work either, 1) The Acrobat uninstaller is stating that Acrobat is not the correct program for this uninstaller to uninstall, ??????? So I just deleted it and went to the startup disc. It gets to the 'preparing to install' stage and that is all, (waited for 3 hours for something to happen, I think that is quite enough).
    Please explain to me what is going on and more importantly get me my Acrobat Pro back so I can update it. NOT HAPPY.
    I have successfully downloaded and installed Reader X from the site, so we will see if that behaves itself when updating.

    Uninstall everything Adobe (yes, including CS4), run the Creative Suite Cleaner Tool, then reinstal lfrom scratch. Only run upates after both CS4 and Acrobat have been successfully reinstalled, then carefulyl re-apply all patches/ updates based on priority. Something busted/ locked your installer database which could include an update gone wrong. Can happen again, but updating from a fresh install is usualyl less prone to such issues and it might actualyl go through....
    Mylenium

  • Problem with update Firmware and Fax with m276nw

    Hi
    First of all sorry for my english...
    I have two problems
    1) I can't update the printer in wirelless mode, I mean the update program (version 2014-08-05 , Version 20140718, 12.05M) and the printer work but finally the printer is not updated.
    How can i do it?
    2) I'd prefer to forward fax in email or in alternative I'd want to read in a web interface. In this case I have a suggestion: An update could be the way.
    Thx
    P.S. Sorry again

    Hello @Compyweb,
    Welcome to the HP Support Forums!
    I would like to assist you today in resolving the firmware update issue and the fax forward to email issues that you're experiencing on your HP Laserjet Pro 200 Colour MFP M276nw. I understand that you have been trying to update your printers firmware via the wireless connection but your printer does not want to do that. I'm going to provide you further instruction on how to properly update the firmware.
    How to Properly Update Firmware:
    It is best to update firmware through a USB Cable connection. This is because the firmware update will reprogram your printer. Sometimes with wireless connections there can be intermittent communication. If the firmware update is interrupted in any way while the printer is being updated it can cause a programming failure on your printer. If this occurs you most likely would need a printer replacement. Also, a firmware update gets sent to your printer much like a print job. Therefore, you need to ensure that you do no have any print jobs in queue waiting to print before you update the firmware.
    What I would suggest doing is running the HP Print and Scan Doctor Tool. If you run this tool and select 'fix printing' than the tool will run a scan on your computer and ensure that the connection, software and driver are all properly setup. If the HP Print and Scan Doctor identifies any issues it will attempt to resolve them for you. I suggest installing the printer for USB connection before running this tool as you want to run the firmware update through USB.
    HP Print and Scan Doctor
    Once you run the HP Print and Scan Doctor Tool and get the all clear that everything is set up properly than you can run the firmware update. Please click on the following link for the proper firmware download:
    HP LaserJet Pro Series Firmware Update Utility
    Once the utility is downloaded, you want to run the tool and send the firmware to the printer. The printer may turn itself off at the end of the update, just turn the printer back on if it doesn't turn on automatically.
    In terms of wanting to forward faxes to email or an alternative option like receiving faxes in a folder on your computer, these are not options that you have with your HP Laserjet Pro 200 Colour MFP M276nw. As the specs for your model printer: LaserJet Pro 200 color MFP M276nw Specs indicate you only have the option to send faxes from a computer.
    Should you still want to receive faxes to your email you could check out the third party service: Efax
    However, I believe you may have to pay for this service. Also, should you have any issues with the Efax service HP does not support this on your product. That means that if you need technical support for efax you need to speak with efax regarding this. For further information regarding Efax, please visit: Efax: Easy faxing anywhere
    Please let me know if this information resolves your issues. Good luck!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • Problem with context mapping and data flow in a FPM application

    Hi All,
    I am trying to develop an ESS application using FPM. For the same, the requirement is to see the history of an employee in the second view.
    The first view has got just the overview information and the second one has got the detail. So, the records or the fields are the same on both the views.
    As per the FPM guidelines, the Model is residing in the Fc component and the respective Vc components are using the model data accordingly.
    I am executing the model in the Fc component calling the executable method in the interfaceController of the first view and then trying to display the output data of the BAPI in the first view which provides the overview information.This is working fine.
    But when i am trying to map the same output node to the Table UI for the second view, the record size is coming zero and thus no information is available.
    For the above issue, I am again executing the RFC in the InterfaceController of the second view to populate the records, which is incorrect as it is already executed and the data is available for the first view.
    I request you to let me know the correct approach to Context mapping and data flow when using FPM-roadmap. Is their any standard method or approach available to deal with such requirements? Please let me know.
    Thanks in advance.
    Regards
    DK

    Hi Idhaya,
    I model node is available in Fc and the Fc interface controller is being used in the first Vc and the second Vc.
    So the idea is, as the executable method is generated in the Fc, so i have created a custom method to call the executable method in Fc, where the input parameter is getting passed and this custom method is finally getting called is the first Vc.
    So , now my first Vc is ready to call the custom method in Fc and execute the RFC. Once the RFC is executed, the nodes in the Fc should get populated which is the ideal case.
    And as the Fc is used as a component in the second Vc, the same node is available to the UI elements.
    But, when I check the record size for the output node, it is always zero, for the second Vc.
    Regards
    DK

  • Weird problem with mysql query and data table buttons !!!!

    Hi,
    I'm using jsc 2 update 1 on windows and mysql 4.1 . I have a page with a data table. One column of the data table contains "Details" buttons.
    Source query for the table is :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    AND tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    The tbl_tesserati.data_nascita is a mysql date field.
    The click event handler code for the "Details" Button is:
    public String btnModificaTesserato_action() {
            try{
                TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");
                getRequestBean1().setId_tesserato((Long)rowData.getValue("idTesserato"));          
            } catch(Exception ex) {
                log("errore nella query",ex);
            return "dettaglioTesseratoSocieta";
        }When i run the project and open the page the table is correctly rendered and populated with some rows. But when i click on details button nothing happens, the page is simply reloaded.
    If i set a breakpoint in the code line   TableRowDataProvider rowData= (TableRowDataProvider)getBean("currentRowTesserati");the debbuger does not stop the code execution ! As if the button was never clicked!
    I tried to modify the source query to :
    SELECT tbl_tesserati.idtbl_tesserati idTesserato,
    tbl_tesserati.num_tessera,
    tbl_tesserati.nome,
    tbl_societa.codice_meccanografico
    FROM tbl_tesserati
    INNER JOIN tbl_rel_tesserato_discipline_societa ON tbl_tesserati.idtbl_tesserati = tbl_rel_tesserato_discipline_societa.id_tesserato
    INNER JOIN tbl_cariche ON      tbl_rel_tesserato_discipline_societa.id_carica = tbl_cariche.idtbl_cariche
    INNER JOIN tbl_qualifiche ON      tbl_rel_tesserato_discipline_societa.id_qualifica = tbl_qualifiche.idtbl_qualifiche
    INNER JOIN tbl_discipline ON      tbl_rel_tesserato_discipline_societa.id_disciplina = tbl_discipline.idtbl_discipline
    INNER JOIN tbl_societa ON      tbl_rel_tesserato_discipline_societa.id_societa = tbl_societa.idtbl_societa
    LEFT JOIN tbl_province ON tbl_societa.provincia_sede_sociale = tbl_province.idtbl_province
    LEFT JOIN tbl_comuni ON tbl_societa.comune_sede_sociale = tbl_comuni.idtbl_comuni
    LEFT JOIN tbl_rel_tesserato_discipline_praticate ON tbl_rel_tesserato_discipline_praticate.tessera_id=
    tbl_rel_tesserato_discipline_societa.idtbl_rel_tesserato_discipline
    LEFT JOIN tbl_discipline_praticate ON tbl_discipline_praticate.idtbl_disciplina_praticate=tbl_rel_tesserato_discipline_praticate.disciplina_praticata_id
    WHERE
    tbl_tesserati.cognome LIKE ?
    AND tbl_tesserati.nome LIKE ?
    AND tbl_rel_tesserato_discipline_societa.id_societa LIKE ?
    AND tbl_tesserati.idtbl_tesserati LIKE ?
    AND tbl_cariche.idtbl_cariche LIKE ?
    AND tbl_qualifiche.idtbl_qualifiche LIKE ?
    AND tbl_tesserati.data_nascita >= ?
    OR tbl_tesserati.data_nascita<= ?
    AND tbl_discipline.idtbl_discipline LIKE ?
    AND codice_affiliazione LIKE ?
    AND tbl_societa.denominazione LIKE ?
    AND YEAR(tbl_rel_tesserato_discipline_societa.data_scadenza) LIKE ?
    AND (tbl_province.nome LIKE ? OR tbl_province.nome IS NULL)
    AND ( tbl_comuni.nome LIKE ? OR tbl_comuni.nome IS NULL)
    Using this query everything works well !! The click handler works and the debugger too !!
    I changed only the AND in OR !!!
    I also tried to change mysql-x-x-connector driver but without solving my problem.
    Can someone help me ?
    Thanks
    Giorgio

    You'll find that it is more to do with the way MySql deals with dates than anything else! Depending on how your date field is setup, then try using a BETWEEN statement for those 2 lines in your first query e.g.
    AND ( tbl_tesserati.data_nascita BETWEEN ? AND ?)
    The date column needs to be in the ISO format to work. If you examine your second query output, you might discover that the output is only going to refer to one parameter (probably the OR one). Did you manage to view the output logs from the application server? You would have got an idea from there with a message like stating a conversion error'.
    Alternatively, you could try using the to_days() function and convert it directly to a number which would be a lot easier to deal with. For example:
    AND to_days(tbl_tesserati.data_nascita >= ? )
    AND to_days( tbl_tesserati.data_nascita<= ? )
    Or try the BETWEEN version with to_days() and see what you get.
    More info about date formatting (v5) here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_to-days
    Before I forget, sometimes you may need to treat dates as Strings rather 'Long' as you did.
    As a matter of interest, did you try your query in a different piece of software?
    If my queries are a little more complicated, I tend to try MySql queries out in the free MySql query browser and also double check in another to verify certain issues. I found it easier to develop SQL in a seperate program then import the final version to JSC making the required modifications for parameters.
    Message was edited by:
    aerostra

  • Problem  with search help and date fields

    Dear experts,
    I have two text fields and to each i assigned cacs_calendar search help.
    It works well normally but if i make text box output only then i cannot select date.
    I want that text box in its disabled form can be used to select date from cacs_calendar search help
    that i assigned.User should not provide manual input which means fiedls should be otherwise listed in grey.

    Hi Aditya
    If a I/P output field is provided an attribute as output only and though search help is provided , the values in the search help list will also be in read-only mode and u cannot select them at all, may be you can solve ur problem thru different approach.
    when a manual entry is done with wrong value which is not present in F4 help/search help list and
    execution is done SAP will by default throw error saying invalid value

  • Problems with update/insert and the ON clause

    I have two rather identical mappings, both supporting SCD Type II. One of them works, the other one doesn't.
    As in the SCD whitepaper, I have a split, that ultimately ends in a union, and then UPDATE/INSERTs into the target dimension. My problem is, that though using the matching_id for matching in one mapping, it is not allowed in the second mapping. The error is ORA-38104: The columns refererred in the ON-Clause cannot be updated "MyTable.MyId" (all loosely translated).
    I just don't understand it, as it should be able to match the ID, and if not found, create a new record using INSERT.
    I found a description of the error that sounded like this (https://cwisdb.cc.kuleuven.ac.be/ora10doc/server.101/b10744/e38001.htm):
    ORA-38104: Columns referenced in the ON Clause cannot be updated: string
    Cause: LHS of UPDATE SET contains the columns referenced in the ON Clause
    Action: none
    I just don't understand how this can be a problem, since I have to carry the surrogate key along, in order to assure that the proper records gets updated...
    Anyone who can enlighten me on this one?
    Regards
    Kim

    Oh yes :) I was a quite active participant. What puzzles me is, that I cannot get mapping #2 to work. I have tried to do everything virtually alike, with regards to the surrogate key, and the extra mapping column.
    My setting for the keys are as below:
    Surrogate Matching
    Load column when inserting: yes no
    Load column when updating: yes no
    Match column when updating: no yes
    Load column when deleting: no no
    Table best viewed in notepad :)
    It "feels" like it's trying to update the surrogate key, instead of actually matching.
    Regards
    Kim

  • Problem with control hints and date formatting

    Hi,
    I have a Date attribute with a control hint 'dd.MM.yyyy' in my EO. When the user browse through the data all date values have 4 digits. But when a lazy user changes a date value to e.g. 12.12.04, the new value is stored as 12.12.0004. This is correct Java behavior.
    When I change my control hint to 'dd.MM.yy', the lazy user can enter 12.12.04, which is stored as 12.12.2004. Great, but the user want to see a 4-digit year.
    My problem is that the customer wants to enter only 2 digits for the year but the application must render the date with 4 digits.
    How can I configure ADF to solve my problem?
    Does Domains help? Is there a general switch in Java or ADF witch converts 12.12.04 to 12.12.2004?
    Any hints are welcome.
    Thanks,
    Markus

    For your 2nd problem, you can create a field of type string (create a data type which has domain STRING), which has unlimited lenght. However, you can only have 3 of these fields in your table.
    I think this will solve the # problem too.
    Regards,
    Valter Oliveira.

  • I can't upload new apps or updated apps, and it shows that I have problem with last purchase. I guess my credit card is over limit and the purchase is not completed because of uncollected. I have filled up some to my credit card. Will it deduct later?

    I can't upload new apps or updated apps, and it shows that I have problem with last purchase. I guess my credit card is over limit and the purchase is not completed because of uncollected. I have filled up some to my credit card. Will it deduct later?
    The problem is I have no computer to use the Itunes and can't go to last purchase. Also, I have ipad 2 using the same adminstrator and have the same problem.

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

  • Y510p and problem with Update Nvidia Driver

    Hi everyonei have problem with updating my y510p lenovo laptop nvidia driver ,my current nvidia driver version is 327.62 which i download from lenovo website,Now for better performance in new games like gta v and witcher3 ,i decide to updating nvidia driver,first remove my nvidia graphic driver from add or remove then download nvidia ver 350 from nvidia official web site , which nvidia website confirm it support my graphic card which is Gt755m , then i install new ver and during install i check clean install , after successful install , restart laptop , then there was problem . when i try to open nvidia control panel it wont running and an error showed up and said "You are not currently using a display attached to an NVIDIA GPU" .i try to open a game , game running in really low fps and i find out game run on hd graphic of my laptop and my nvidia graphic wont run .The only way to repair was i install my last nvidia driver 327.62 and run a system restore .guys what is your suggestion and how i can update my y510p nvidia driver ?Thanks   

    Hi Y510Man,
         The video graphics installation order is important. You need to install the Intel Graphics first, and then do the Nvidia. IIRC you should un-install the Nvidia driver, then re-install (or upgrade) the Intel HD Graphics driver. Reboot, and install the new Nvidia driver.
         I don't know why, but every time I upgraded my Y470 Nvidia driver, I had to use this procedure. First install, or re-install, the Intel driver, then install the Nvidia. You can't just upgrade the Nvidia driver without a re-install of the Intel. I think it has to do with the Optimus setting, and the automatic switching.
        Let us know how it goes.
    Cheers
    DragonRider

Maybe you are looking for