Questions tagged as 'date'

1
answer

Check 2 values after. (Score)

I'm developing a code where I have to calculate daily parking. If the user selects for example:    From: 11/5/2015 3:00 PM until 11/6/2015 3:00 PM The value to return is 1 , that is, 1 daily. If you select:    From: 11/5/2015 3:00 PM...
asked by 05.11.2015 / 17:52
1
answer

Problem displaying date on Android

When displaying a date that was entered into the database, of type DateTime , the app shows the current date: Iwouldalsoliketoconvertthisdatetodd/mm/yyyytofitaportraitlayout.Partofthecodethatdealswiththislist:publicList<Despesa>ge...
asked by 20.01.2015 / 14:12
1
answer

Return days of the year by removing the ones in a Variable

I need a function in PHP that returns me every day of the year except for the ones that were previously selected. Example My client selected ( 01 / 01,02 / 01,04 / 01,12 / 01,12 / 05,18 / 01,08 / 01,10 / 11,05 / 12,11 / 09,01 / 12 ) Then I...
asked by 14.06.2018 / 22:26
2
answers

Checking if inputs are empty with JavaScript

I have the code below that creates three fields in HTML These fields go through the checks with JavaScript , but the part that should check if the person typed something does not work, am I doing it the right way? function chec...
asked by 29.05.2018 / 19:42
1
answer

Date format error when it is Brazilian Daylight Saving Day (BRST)

I'm having a problem getting a variable date (Sun Oct 21 01:00:00 BRST 2018) off this one time difference because it is generating a billing error when the date is taken from the database with that 1 hour difference. I've tried using t...
asked by 02.05.2018 / 16:30
1
answer

How to convert day from date to date (without timestamp) [PostgreSQL]?

I have the value 2016001 symbolizing the first day of the year 2016, how do I get for example ANO/MES 2016263 ? Example: ENTRADA: $data = '2016001' SAÍDA: $anomes = '2016-01' If you could do the inverse of this SQL...
asked by 12.06.2017 / 16:01
1
answer

Do not allow retroactive date in Date field

The field of type date can not allow retroactive dates. I need the script to recognize the current date and not allow earlier dates. <div class="col-sm-4"> <label for="ultimoDiaTrab" class="control-label">Último dia a ser traba...
asked by 14.03.2017 / 15:22
1
answer

Doubts with dates smaller than 12/31/69 in PHP

Galera, I have a problem transforming database dates to display on screen. In my code I do the following. $objReturn['DADOS'][$key]['DATA_NASCIMENTO'] = date('d/m/y', strtotime($value[DATA_NASCIMENTO])); But what appears on my screen...
asked by 26.06.2017 / 19:42
3
answers

How to get only the month of a date with Laravel 5.3?

I need to get only the month of a date that comes with a $request . But I do not know how to do it: if ($request->parcelas > 1) { $mes = $request->data_vencimento = date('m'); for($i = 0; $i <= $request->pa...
asked by 21.11.2016 / 16:42
1
answer

How to calculate the time difference between certain hours? [duplicate]

public function checks($request) { $token = $this->count->All(); foreach($token as $tokens){ $tokens->system_contador_user_update_at With this I get the time it is written to the bank with type of field timestamp wit...
asked by 01.08.2017 / 14:29