Formatting dates in a site PHP - please help


I want to be able to display dates on a dynamic page using PHP in other than yyyy-mm-dd format standard. When I use the recordset object links to select a particular area (fixed in the table as a date type field) and change the format to display a date in the form page is in the correct format, but the date is always January 1, 1970 (for example, January 1, 1970 or on 01/01/1970 etc.). As soon as I put the None format the date returned correctly according to the date indicated in the table, but obviously in the YYYY-MM-DD format.
Of course, I hurt something basic, but I can't understand my mistake for the life of me.

The page in question is events.php

If anyone can spare time to help a desperate soul it would be greatly appreciated.
Thank you
Graham

Iain71 wrote:
> This is something I'm trying to do as well - what is the best way to change
> the format for a text input field? I have a form dating from the people collection
> birth - also using PHP / mySQL.

MySQL stores dates in a format: AAAA-MM-JJ. attempt to store all
another format and it will be converted to 0000-00-00.

The more wisely to deal with this must have three separate entries
fields for year, month and date. Then use PHP to validate fields,
Make sure that the date is authentic (in other words, reject the 30, 31, February)
September, and so forth) and build a string in MySQL format.

--
David powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Tags: Dreamweaver

Similar Questions

  • Some how my email was requested to be removed and the link to verify that I DON'T want be removed takes me to some site randomly, please help.

    Some how my email was requested to be removed and the link to verify that I DON'T want be removed takes me to some site randomly, please help.

    Your post is a little vague, but I fear that you may have received a phishing e-mail. Please tell us all about this request but do not follow any links or give any information at this stage.

  • Automation of data not in Piano roll - Please Help

    I was wondering if someone could kindly help please

    I use an external controller on a keyboard to change things like cut wide in the ES2 when you use a synth.

    After the change in writing Automation data appears in the area of popular songs, but I can't understand how to do so that he can show below the events of midi notes in the piano roll editor and allow me to also change it. I can always change the same midi control function (like cutting) and he appears in the form of empty data not what I recorded and any change overrides greater automation in terms of titles.

    Is there a way to show the recorded data automation in the piano roll allowing me also change please?

    Thanks for any help

    Use the region based instead of track based automation...

    Click on the image if you don't see it animated...

  • Stamp brain - what direction to go to set up an ecommerce t-shirt site. Please help wise people!

    Hello

    I have a little experience of 10 years creating web sites, but things have changed a lot (but I'm very good to teach myself).  Can someone advise me on how to proceed?

    I want to create a t-shirt ecommerce site and have no money to pay someone to make the site (perhaps when the company takes off, I will, but for now)-I design myself and have all the design elements made, but do not know the best way to implement given all the technology out there. and do not want to go in a direction, namely my efforts have been wasted much later.  Here's my way of thinking...

    The main site contains t-shirts.  When a user clicks on a picture, it takes an acronym "t shirt their page where they can configure the design options (put the drawing on the Pocket, back or forward in the Center, etc.).»  I was going to create checkboxes for them to do that, once clicked, will change the image to show what he looks like.  This means I want to create an image for all possible options to check and load that into the "it's what looks like you t shirt" (enough and I can't do that I think that easy).  I'll do it for each t-shirt on the home page.

    But I thought, I might just have a t-shirt plane in space "is what looks like you t shirt ' and with an image of the design, simply reposition and resize using (and this is where my knoweldge is small for now) jqeury or some other languages, or even CSS and div?  What would be the best approach?  That way I would only create the design and the White T-shirt and use the code to position it to represent the final product.  It would be better to use a CMS as a Joomla for this (which seems very complicated)?  Before going further than the design I thought that I would ask you intelligent people.

    Thank you if you got that day...

    Part 2 of dilemma:

    The user will then click on proceed to checkout where I use a shopping cart system (probably Zen Cart because it's on the server the hosting company who intend to use (unless it is suggested otherwise)).  I need every version of the t-shirt to get a product ID unique which refers to a database that contains pricing options and it will be sent to the 'zen cart' and who will process the transaction.  My understanding is correct?

    Thanks a lot for your suggestions.  Learning one or two things (CSS and DW) is OK, learn 5 things at once makes my head ache! I got confused

    Zen cart is free.  And you get what you pay for - software that is difficult to work with, very cheap, poorly supported and has many security holes, that's why hackers love to exploit.

    Get a real basket. Money well spent.  Build one yourself is risky and requires expert competence with server-security, data encryption, PHP, MySql, HTML, CSS, JavaScript, PCI compliance, SSL certificates, etc...   You will drive yourself crazy trying to learn what you don't know.

    UltraCart is easy to install and they have a 30 day free trial so you can test before decide you.  There are many PCI compatible shopping cart that you can use.   If you have a merchant bank account, start with your bank to find out which processors and gateways they require you to use.  Which will limit your search to carts that work with your payment gateway.

    In regards to your site, keep it simple, semantic, friendly and responsive user.

    Nancy O.

  • Tungsten T3 - need to DAT file access with address - please help

    I have an old Palm Tungsten T3. The desktop computer with the address information synchronized died and the T3 has lost power (so no more addresses).

    I have a. Backup DAT files with all my addresses. Can someone tell how can I have access to these.

    Palm Desktop 4.1.4e reinstalling did not help because it does not allow me to import. DAT files.

    Can I import this file into any other application or open in Excel etc.?

    Any advice would be much appreciated.

    Thanks in advance.

    You must physically copy the .dat file in the directory of the user on the existing address.dat file.  Find the one with your short hotsync name (i.e. - C:/Program Files/Palm (or PalmOne) / name of your Hotsync/address) and copy the .dat file.

    Make sure that you copy the file and keep another a safe in the case where something goes wrong.  The existing empty address.dat file will be only about 2 k in size.

    Good luck!

    WyreNut

  • Menu of Disabeling default Date field... urgent please help

    I use a fild of date but I want to disable the menu item by default it adds when another dialogue with the date is launched and you can scroll amonghts the date.

    a copy of the Date field class

    "The field also adds a menu item to change its value. When it is called, a dialog box appears in which you can use the wheel to change the date without keeping the ALT key. The date all is shown, but only the current field is selected and editable. This dialog box supports the same IRS as the base control. Pressing ENTER or clicking on rejects dialogue and modifies the selection. Pressing on ESCAPE rejects dialogue and cancels the change. "

    I don't want this feature, how can I dissable it?

    Kind regards

    Kaddy

    There are 2 ways you can accomplish this.  The menu item is added only if the DateField is editable.  For example, you could create the DateField with READONLY style.  Alternatively, you can override method makeMenu of the field so that context menu is not added.

  • Having a problem with access to several sites. PLEASE HELP QUICKLY!

    OK so I still really still did nothing with my laptop, but I tried to enter in google, download Itunes and I can not even access the E-system, all my sites search engine don't "work" ive been all day, ive tried already check if Windows 7 is the blocking of sites, my internet itself to have this problem but I can't seem to find out what's wrong , ive used IE9 and Chrome, but the two do not work even if I charge it appears always like it or at least someone to look how to do everything and send me the link...

    Try to run a full system scan with:

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

  • what my pc my data is safe and blocked please help

    I got a new link up Dsl att modem Dell desktop and what to safe keep, has new Xps 8500 wireless card built in, not of a Wi - Fi router. I found unsecured Wi - Fi signals. How can I make sure that the pc is safe and secure. Please answer soon?

    My pc is new & has been installed by dell

    Hi bofish,

    If the system comes with a wireless card, it detects all networks wireless in range. The unsecured network you're talking about could be your neighbor. Until you use your connection with password on it and security software installed on the system, the connection is secure.

    Answer please if you have any questions.

  • data query oracle simple summons please help.

    Basically, I'm trying to get a number of people on columns. Im having a hell of a time acomplishing can someone throw me a BONE I know there must be a way to do this?
    the closest I came to an answer she
    is it
    select sum(managerCOUNT) manager, manager from 
    (
    select count(manager) managerCount, count(lead) leadCount, manager, lead from project_1
    group by manager, lead 
    )group by manager
    Here is the table structure and data
    create table project_1 ( manager varchar2(250), lead varchar2(250) );
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JAM', 'JAM')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('PMA', 'JAM')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JB', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('SF', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JAM', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JB', 'JAM')
    NAME              MANAGER       LEAD
    JAM                   2               3 
    JB                    2              3
    PMA                1               0
    
    etc... you get the idea

    Hello

    mlov83 wrote:
    Basically, I'm trying to get a number of people on columns. Im having a hell of a time acomplishing can someone throw me a BONE I know there must be a way to do this?

    Thus, every person, whether a Manager or a lead or both, gets a line?
    You probably have a table where there is one line per person, and a foreign key constraint allows you as only denter someone such as a Manager or a lead if they are already in the table. If you do not, you can generate a game on the fly, as I did below, but it's always a good idea to have a separate, real results table.

    the closest I came to an answer she
    is it

    select sum(managerCOUNT) manager, manager from
    (
    select count(manager) managerCount, count(lead) leadCount, manager, lead from project_1
    group by manager, lead
    )group by manager
    

    Thanks for posting that! It is always useful to see what you've tried.

    Here is the table structure and data

    create table project_1 ( manager varchar2(250), lead varchar2(250) );
    

    The LEAD is the name of a built-in function, is not a very good column name. Use something like leader or project_instead.

    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JAM', 'JAM')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('PMA', 'JAM')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JB', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('SF', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JAM', 'JB')
    INSERT INTO "PROJECT_1" (MANAGER, LEAD) VALUES ('JB', 'JAM')
    
    NAME              MANAGER       LEAD
    JAM                   2               3
    JB                    2              3
    PMA                1               0
    
    etc... you get the idea
    

    With the sample data you posted correct results do not include only 1 row? Which is much easier to say "etc... you get the idea" as saying:

    SF               1            0
    

    Here's a way to get the desired results:

    WITH   all_people     AS
    (
         SELECT     manager          AS name
         FROM     project_1
        UNION
            SELECT     project_lead     AS nmae
         FROM     project_1
    )
    SELECT       a.name
    ,       COUNT (CASE WHEN a.name = p.manager      THEN 1 END)     AS manager
    ,       COUNT (CASE WHEN a.name = p.project_lead THEN 1 END)     AS project_lead
    FROM       all_people  a
    JOIN       project_1   p  ON  a.name  IN (p.manager, p.project_lead)
    GROUP BY  a.name
    ;
    
  • file.data.readUTF (); does not properly, please help me :)

    I downloaded a csv file from google to outlook, but when I try to read it, I get errors. For example if I do this:

    private void completeHandler(event:Event):void {}

    var st:String = file.data.readUTF ();


    After that the st first to lines variables contain something like that


    RST name, surname, name, title, suffix, initials, webpage, sex, birthday, birthday, location, language, Internet + free/busy, Notes, E-mail address, address email 2, email 3, main phone, home phone, home phone 2, Mobile phone, Pager, Home Fax, personal addresses, Home Street, Home Street 2, Home Street 3, home address PO Box, town house, home State, Home Postal Code , Country of origin, spouse, children, manager name, name of the wizard, under the company main phone, work phone, business phone 2, Business Fax, Assistant phone, company, job title, Department, office location, ID number, organization, Profession, account, address professional, street, Business Street 2, Street 3, business address PO Box, Business City, State business, postcode, country company, other Business phone Another Fax, another address, other street, another Street 2, another Street 3, other address PO Box, another city, another State or another ZIP Code, other countries, reminder, car phone, ISDN, Radio telephone, TTY telephone, telex, user 1, user 2, user 3, user 4, keywords, mileage, Hobby, billing information, directory server, sensitivity, priority, private, categories

    ,,,,,,,,,,,,,, [email protected] ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Normal,,,

    where as in the csv file the first two actual lines were:

    First name, middle name, name, title, suffix, initials, Web Page, sex, birthday, birthday, location, language, Internet free, busy, Notes, address e-mail, address 2 E-mail 3 address, main phone, home phone, home phone 2, Mobile phone, Pager, Fax, home, home, Home Street, Home Street 2, Street 3, the home address PO Box, town house , home State, Postal Code home, country of origin, spouse, children, Manager, name of the wizard's name, referred by the company main phone, work phone, business phone 2, Business Fax, phone Wizard, company, job title, Department, office location, ID number of organization, Profession, account, address, street, Business Street 2, Street 3, business address PO Box, Business City, State business, Business Postal Code , country company, another phone, another Fax, other address, other street, another Street 2, another Street 3, other address PO Box, another city, another State or another ZIP Code, other countries, reminder, car phone, ISDN, Radio telephone, TTY telephone, telex, user 1, user 2, user 3, user 4, keywords, mileage, Hobby, billing information, directory server, sensitivity, priority, private categories

    ,,,,,,,,,,,,,, [email protected] ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Normal,,,

    This was bugs me for months

    Wouldn't be file.size?

  • Code 646 error that I tried to install updates KB977304 and KB976416, but they continue to come down can someone please help me.

    Error 646 dates moved KB977304 and KB976416 please help.

    Hello

    You need these updates? They have already installed or do not have the programs what are
    (Windows updates sometimes suggested those who are not needed). If Yes, then go into Control Panel-
    Updates to Windows - click right on and HIDE.

    Try this 1st to see if it helps, and it should:

    Description of the Patch registration cleanup tool
    http://support.Microsoft.com/kb/976220/

    ------------------------------------------------------

    If necessary :

    Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
    or the update itself - double click a view more information (or click top then discovers on the right)

    Those who will take you to a page where you can download the update.

    Or go here and the KBxxxxxx number to download it.

    Download Center - mount the KBxxxxxx.

    Microsoft Download Center
    http://www.Microsoft.com/downloads/en/default.aspx

    Download - SAVE - go to where you put them - click on - RUN AS ADMIN

    Then you can right click on the update in the updates Windows and HIDE.

    If you get an error Installer install this version:

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    ----------------------------------------------------

    Then run this:

    How to reset the Windows Update components? -a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system for Windows Vista, Windows Server 2008, update tool and
    for Windows 7
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------------------
    Because these are all Office updates you might get more information if necessary in the Agency of those groups that
    may have experienced the same problem.

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Microsoft.public.office.misc discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us

    ------------------------------------------------------------

    If necessary you can incident free get reports however the above should take care of it for you.

    Windows updates - free Incident report

    Go here and click on-> Windows Update fails while searching, downloading or installation of updates
    http://support.Microsoft.com/GP/wusupport#tab3

    The security updates, you can get free support Incident report
    http://www.Microsoft.com/protect/resources/support.aspx

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • I had saved my old 32-bit computer on a drive and the WD hard drive. I can't throw the disc or hard disk on my new 64-bit computer can you please help

    I had an old computer 32-bit Windows XP Professional

    All files and folders have been saved on the drive hard portable Western Digital and CD.

    I can't open the data in my new computer with Windows 7 Home premium 64 bit preinstalled by the vendor.

    The old computer is down.  I can't access my saved data.

    Can you please help.

    Thank you

    Hey riri,.

    Thanks for choosing Windows and thank you for providing an opportunity to help you.

    According to the description, you have problems to restore backup data from Windows XP to Windows 7.

    What application did you use to back up data?

    Perform the steps from the link below and see if it is resolved.

    http://TechNet.Microsoft.com/en-us/magazine/ee851568.aspx

    Answer to us if you are having problems with the restoration of data or any question of Windows, and we would be happy to help you.

    Good day!

    Hope this information helps.

  • Code PHP/mySQL help please

    Hi all

    Thanks to David Powers fab tutorial I am now well on my way to my first dynamic website with PHP/mySQL competeing, (thanks to David ), but I'm stuck on one particular area... can someone please help?

    I know that the mySQL database using the YYYY/MM/DD format for dates, and that's fine. I set how to display in a format more regular (for example, September 1, 2011) for my application, but I'm stuck on how to convert a more regular formatting date is entered by the user of the site to mySQL format.

    Ideally I would like to enter users or tell the 09/01/11 or 09/01/11 (or something in that sense, to be recognized and displayed on the registration form, but to have a back-end service that converts the data to the format mySQL. I think I'm reading a lot of posts forum who say that this is possible, but unfortunately I can't quite understand how or where the code should sit. Someone would have is not afraid to take a look at my page of codes to identify actually what I need to insert and also as important... where!

    Is it possible to have a miniature calendar date picker that can be built next to the entry field in the right format and date to make sure that a valid date is entered along these lines? Where this could be extracted?

    Thanks for help if necessary

    Mark

    GetSQLValueString (date('Y-m-d'), strtotime($_POST['date']), 'day'),

    Make this line looks like this-

    GetSQLValueString (date ('Y-m-in, strtotime($_POST['date'])), 'day'),

    This was my mistake - sorry.  The MySQL data type DATE should be in YYYY-MM-DD format.  If this is the data type of this field "date", and then copy the following code should work.

  • Sort data please help

    That's what I'm trying to do. I have a file periodic_chan3.bin which is sampled values of three channels of periodic signals in interlaced format. The data is stored in binary format (long of floating point of the double procession) DBL and big-endian representation. I am reading the file and draw all the three waveforms on the graph of a waveform. The data has been saved from time zero, with a sampling frequency of 100 samples per second. Then I scale the x-axis of your waveform graph so it displays the time in seconds.

    So I try, on the wave of the chart to create three sets of cursors and cursors to display the average value of each of the three waveforms. The color of the cursor Y for a given signal average must match the color of the display of the waveform on the chart. For example if the graph of the signal is displayed in red the cursor there shows the average of this signal must be red.

    What happens when I do not open the file I see a white contour mesh a sine graph, a graphical square and sawtooth chart. I can't seem to trace the three waveforms seen clearly with the three above-mentioned distinct colors. I can't seem to sort correctly and represented as mentioned above.

    I would also help with the calculation of the average or expected from each of the three periodic waveforms.

    Attached are the files please help. Pgm4 is the VI, and periodic_chan3 contains the data that needs to be sorted.  I'd be very happy if somene were able to fix the and submit the changes so I can see how it works. Thank you.

    Edit: I get an error that says periodic_chan4.bin "is not a valid extension of an attachment" so I'm not able to uplad it. Is there a way to othe I could download it?

    Xtasy26,

    In your post you mention that you try to view 3 averages of waveform, however your code is showing that you are broadcast 4 values. This might be the reason why your getting the different forms of data. Instead of an array of all the waveforms 1, then a table of all 2 waveforms and a waveform table 3, you get a mix of all three in each of your waveforms.

    To calculate a moving average or mean that it is actually an integrated in the example in BT sound finder called "running Avereage.vi calculation"

    You can also view the attachment to see Multiple waveforms channel displayed on a single chart.

  • recently I formatted my windows XP PC. after update to show that it does not allow the genuine.but when I brought it was authentic. I have the product key with me.Please,help help find the solution

    recently I formatted my windows XP PC. after update to show that it does not allow the genuine.but when I brought it was authentic. I have the product key with me.Please,help help find the solution

    Please visit http://www.microsoft.com/genuine/ and click the Validate Windows button, then restart your computer.

    If you were not able to validate, follow these steps:

    1. Download this diagnostic tool, save it to your desktop: http://go.microsoft.com/fwlink/?linkid=56062

    1B. double-click the executable file to run the tool.

    2. after running the tool, click the Windows tab, and then click copy in the Clipboard.

    NB: You can open a new file in Notepad, paste the contents of the Clipboard in it & keep for future reference.

    3 start a new thread in the following forum and paste the results of the WGA diagnostic data in a post detailing the problem: http://social.microsoft.com/Forums/en-US/genuinewindowsxp/threads

    4 Troubleshooting specialist will analyze the data and recommend an appropriate solution.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

Maybe you are looking for

  • The server request timeout expired pending request from the browser. How to fix?

    After having successfully reached www.foxnews.com, trying to branch to one of the stories in the viewfinder and receive "Request Timeout".The server has expired pending request from the browser. Reference #2.5cab3c41.1399773250.0Using Internet Explor

  • Beginning of screen satellite A100-646 is that if I press Fn and F5

    I am the owner of a satellite * A100-646 * and every time I turn on I have to press several times on * Fn + F5 * for the screen to open but it loads windows vista all ok. Sometimes, the screen goes black 2 or 3 times but only sometimes. Someone at -

  • DAQmx continually update the example output table

    Hello I use the example Synch_AI-AO in the DAQmx folder and it works very well for sine waves, pulse, triangle waves, or whatever it is periodic. However, I would like to output an array of noise which produced WhiteNoise, which is continually update

  • Printer does not print in black and white

    Hello I just bought the HP OfficeJet Pro 8610. It connected fine, but I can't print color prints. I get not anywhere, an option to choose the color, print or black and white. Can anyone help. I work on a mac, 10.8.5. Thanks for your help.

  • HP Envy 15 laptop t: installing new batteries Notebook

    Hi all I have a laptop HP Envy (p/n K2T41AV) who arrived via FedEx an hour ago. I struggled to install the battery since then. The small design on the "Installation Instructions" is incomprehensible. I don't know it is logical for someone who knows h