I have a small .php file for a .csv import.
I have having troubles getting the date to insert. I keep getting 1970-01-01. when i run the code in a seperate file I get the desired date I want. I have tried multiple solutions but nothing changes.
I will include the full .php file and here is the code for the date i am trying to make work. Just so you know date is in this format in the .csv file Jan/06/2018 and i have it converted to 2018-01-06
//$date_old = $line[0]; ---> this is for the line in the .csv file
$date_old = "Nov/12/2017"; --> this is just for testing
$pieces = explode("/", $date_old);
$nmonth = date("m", strtotime($pieces[0]));
$nday = $pieces[1];
$nyear = $pieces[2];
//$date = '$nyear."-".$nmonth."-".$nday';
$date = '$nyear-$nmonth-$nday'; --> when i displatyed this I got 2017-11-12
$date = date('Y-m-d', strtotime($date));
I am sure someone can help me figure this out.
Hello Hiring member I am bhavika i have 2+ year experience in php i can make this sense easily as per your requirement so you can trust on my self you can get best service from my side Thanks in advance
Hi,
I have seen your code. you just need to swap 2 lines of code. First assign the date variable with date picker function then process the date. Hope it will fix your problem.
If you need further assistance please feel free to join me on chat.
Thanks,
Shovon Choudhury.
Hi, I understand that you have a date to insert in database. I will check and debug with the code.
I have experience in MYSQL along with PHP, JS, JQUERY, AJAX.
I am looking forward to have a small word with you and get the task.
yes, i can do it. we are a team of developers hands on experience in web designing and development. we had been in this field for more than 2 years now. Before we begin developing website, lets discuss it precisely first?
I have 4+ year of experience in IT field and in this time of period I worked on many frameworks and Cms. I have the team of experienced quality designers.
Quality and service are my first priority.
I'll wait for your positive response.
Thanks & Regards,
Ankit S.
I can successfully complete this and have dealt with timestamps in multiple languages on both front end and back end. Confident of getting this done in one day :-)
Hi,
I am willing to do this at lowest price allowed by freelancer.
can you send me csv file and database table structure as well, so i can start working on this and fix this asap.
Please let me know your thoughts.
Regards
Rikhi
Happy new year. I am very interested in your project.
I can see that you are looking for someone who can get date.
It will be happy if you select me.
Thanks.