#### Category : time

I trying to make a kinda jukebox online. I wanna show people the duration of whole queue. i want something like this: foreach ($queuelist as$song) { $queuelistTime =$queuelistTime + $song->duration; } the fomat in te database is 00:02:53 (H:i:s) and it need come out like: 02:53 (i:s) or more likely: 2:53 Sourc.. Read more I have Project about timesheet, i have tasks table and timers table, each task has many timers and timers belong to task. I calculate the time between start_at and end_at in getTotalAttribute as you see in the pictures down, and i got the difference between them in minutes. Timer Model class TsTimer extends Model { .. Read more I have a project, the project is using flutter and laravel. The date and time that saved in flutter is in microseconds using flutter function "microsecondsinceepoch()". Now I want to convert it in laravel so it becomes date and time. Help me to convert it, because I’ve already looked at the internet but the internet .. Read more I have two var$idle1 10 minutes $idle2 = 25 seconds this values are converted from seconds to redable time with the help of the code given below$sec1 = 300; //value in seconds $sec = CarbonCarbon::now()->subSeconds($sec1)->diffForHumans(CarbonCarbon::now(), true); What i want to achieve – I want to plus this two values $idle1 +$idle2 how ..

I have a ‘services’ table having a column called ‘duration’. Its datatype is time and data stored in this column like ’00:30:00′ I also have another table for bookings having two columns ‘start_time’ and ‘end_time’. Both columns datatype are also ‘time’. I want to get summation of service->duration + booking->start_time and store it in the ..

i need help for decrement time every second dinamicly in view with this variable. $from = Carbon::createFromFormat(‘H:i:s’, Carbon::now()->toTimeString());$diff = date_diff($from, new DateTime(’07:30:00′))->format(‘%H:%I:%S’); i already try javascript from any tutorial but not working. sorry for my poor English Sourc.. Read more so i got imported my large excel file with huge informations with 1 sec and i did get all the information i need to display within 1 sec to , but i got a big probleme when displaying the array in the view coz i m testing if the cells are correct or not i .. Read more so i got imported my large excel file with huge informations with 1 sec and i did get all the information i need to display within 1 sec to , but i got a big probleme when displaying the array in the view coz i m testing if the cells are correct or not i .. Read more I currently have an API of webinars where in it will post about a webinar and its time and date. I want to change the format of the following entities since I want to manually put it using my postman$table->date(‘web_start_date’)->nullable(); $table->date(‘web_end_date’)->nullable();$table->time(‘web_start_time’)->nullable(); $table->time(‘web_end_time’)->nullable(); I read about the Carbon but I don’t exactly know how .. Read more I have a field in my DTO class which accepts start_time and end_time as "2:00 AM" /** * @var string */ #[CastWith(TimeCaster::class)] public string$start_time; // 01:00 AM example /** * @var string */ #[CastWith(TimeCaster::class)] public string $end_time; Can I parse this format of time using Carbon in my Caster Class #[Attribute] class TimeCaster implements .. Read more when client send an ajax request , there sould be some operations run in server (for example handling a dadabase table), and when this operations last too long , an error message that defined in my program , in javascript side , will be shown . This despite the fact that operations are runing in .. Read more I wanted to validate the given time to be greater than current time.$request->validate([ ‘start_time’ => ‘required|after:now’, ‘end_time’ => ‘required|after:start_time’, ]); Above code checks the date instead of time. Sourc..
Hi I am trying to get an array of dates between 2 timings and excluding the startlunch_time to endlunch_time. I have managed to display out the list of timings based on intervals, however I would like to not show the lunch time interval at all. Below are my controller codes: private function getSelectedTiming($day,$starttime, $endtime) .. Read more How can I convert this string into date format? or I think it also string to string since there’s .csv in the last portion This is my query in my database and I want to convert the last portion 32570667 into time current output 2021-03-30-32570667.csv expected output 2021-03-30 13:58:02.csv It is possible? What I’ve tried .. Read more I’m using Laravel 8.23.1, PHP 7.4.1 I need to import 800-1000 users from .csv. I’m using MaatwebsiteExcel for import. The main problem is that Hash::make() is taking too much time, making it impossible not to exceed the maximum execution time. I heard about running the command through Artisan CLI, but I don’t know how to .. Read more I am trying to show next time slots from the current time. Table contains the time slots ‘time’ = 12:00 AM, 10:00 AM, 12:00 PM, 02:00 PM, 05:00 PM, 08:00 PM, 10:00 PM I just want to show the upcoming time slots from the current time. The time slots remaining for today will show in .. Read more I have a sensor that sends data every minute. I store this in a FireStore document. The ID of this document will be a epoch timestamp. Every hour has its own document. example: 1600786800, 1600790400 etc.. My question is, if my document ID = 1600786800 (Tuesday, September 22, 2020 3:00:00 PM) Should this document contain .. Read more Please Excuse Newbie Question but i am working on my first laravel project. I am trying to fetch time from timestamp. below is what i am trying to achieve$details=DB::table(‘CourseListNew as cl’) ->select(‘cl.Title’,’p.Title as ParentTitle’, ‘cd.Trainer’, DB::raw(‘day(cd.StartingDate) as day’), DB::raw(‘day(cd.EndingDate) as day_end’), DB::raw(‘(cd.StartingDate) as month’), DB::raw(‘year(cd.StartingDate) as year’),DB::raw(‘time(cd.StartingDate) as start_time’), DB::raw(‘time(cd.EndingDate) as end_time’), ‘cd.StartingDate’, ‘cd.EndingDate’, ..
How can I format time data type in laravel? Please see my code below. Model protected $dates = [‘start_date’, ‘end_date’, ‘show_at’, ‘hide_at’, ‘created_at’, ‘updated_at’]; View {{$promotion->show_at->format(‘h:i:s A’) }} Data from database (type: time) 23:59:59 Error Unexpected data found. Unexpected data found. Source: Laravel Sta..