Find Jobs
Hire Freelancers

Date format in difference using DateTime and date inside MySQL table

$10-20 USD

Dalam Kemajuan
Disiarkan lebih dari 3 tahun yang lalu

$10-20 USD

Dibayar semasa penghantaran
I'm working in some datatables for a ticket system that have SLA's, the ticket database is under MySQL The SLA's are that the ticket must be solved within 45 min otherwise a warning label appears next to the ticket number I'm using this method: $start_date = new DateTime(''.$rows->created_time.''); $since_start = $start_date->diff(new DateTime("now")); $project_id_td .= '<a href="'.$href.'">CITA-'.$project_id.'</a>'; if ($since_start->i > 45) { $project_id_td .= '<span class="label label-danger pull-right">Incumpliendo</span>'; } Only works if establish the flag with days ($since_start->d > 1), but minutes or hours it gives me random numbers I assume the problem is caused by the date formats In the database the dates are like this: 2020-10-25 13:46:49
ID Projek: 27906714

Tentang projek

9 cadangan
Projek jarak jauh
Aktif 3 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
9 pekerja bebas membida secara purata $18 USD untuk pekerjaan ini
Avatar Pengguna
Hello, I'm Abu Gosia. I'm interesting in your project very well. Please give me access so I can make working code for date with condition. I'm good in Website Design, Yii2, PHP, Laravel, Codeigneter, Wordpress, Open Cart, C#, .Net, MVC, Angular.js, ASP.NET. I m quite well experienced in these jobs. Let's go ahead with me. Thanks
$15 USD dalam 1 hari
4.9 (218 ulasan)
6.9
6.9
Avatar Pengguna
==================== i can print in your required format like as dd-mm-yy or dd/mm/yyyyy etc within few min $date1=date_create("2013-03-15"); $date2=date_create("2013-12-12"); $diff=date_diff($date1,$date2); echo $diff->format("%R%a days"); i would be happy to discuss your projects needs and how can help you meet them. i look forward to intiate chat with you ! Hardik J. Ponkiya Thanks ========================
$18 USD dalam 1 hari
5.0 (85 ulasan)
4.8
4.8
Avatar Pengguna
hello sir good morning i am ready to start work for you as per your requirements can you please share source code with me so that i can check it and fix it waiting for your positive response thank you so much
$20 USD dalam 7 hari
4.8 (49 ulasan)
5.0
5.0
Avatar Pengguna
⭐✅Dear Client, How are you?✅⭐ Thank you for your job posting I hope you are well and staying safe without COVID-19 effect It seems to be an interesting work and a good opportunity to show my web skills to work with you in the future as well. I only apply to jobs when I know I can do it. How we can finish your project in time and perfect? The communication is very important! Send me a message now, and we can discuss everytDear sirng! I have read the project requirements carefully I can start work right now. I will make your website look very nice, modern and professional. The website load fast, it will be SEO friendly and responsive to all mobile devices as well. What we Guarantee? - Fully Creative Designs Unlimited Revisions - Meet the Deadline - 100% self-created Designs - Will Provide fully Copyrights on Demand Thank you regards
$20 USD dalam 1 hari
5.0 (10 ulasan)
4.1
4.1
Avatar Pengguna
it is very easy job and I can complete it in a short time Please contact me thanks
$20 USD dalam 7 hari
5.0 (2 ulasan)
1.7
1.7
Avatar Pengguna
Hello. It is because of the Date Format. Please give your PHP code. I can help you to fix it. Thanks.
$15 USD dalam 7 hari
5.0 (3 ulasan)
1.4
1.4

Tentang klien

Bendera MEXICO
Tlalnepantla, Mexico
5.0
16
Kaedah pembayaran disahkan
Ahli sejak Jul 15, 2018

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.