Questions tagged as 'fecha'

0
answers

Fix dates entered with format dd / MM / YYYY

With Java, instead of recording dates with the dd/MM/yyyy format in the database, I used the year in uppercase ( dd/MM/YYYY ). I would like to revert the engraving, and be able to transform the dates wrongly entered for the correct...
asked by 20.04.2017 / 15:28
1
answer

Insert "/" into a SQL column to format it for date

A client sent me their database in which dates are included, however they come with a YYYYMMDD format, and I would like to create a "query" where I can insert the "/" delimiter in that column so that it remains this way YYYY/MM/...
asked by 17.03.2017 / 02:13
1
answer

Annual SQL query grouped by dates

I need to make an annual consultation grouped by months of all registered users in the period of one year. The query would be the following: SELECT COUNT(*) AS total_users, YEAR(created_at), MONTH(created_at) FROM 'users'...
asked by 23.03.2017 / 13:03
0
answers

Get number of weekdays of the month in PHP (without weekends) [closed]

How can I get the number of days of the month without Saturdays or Sundays in general for any month? Example: December = 31 days Saturdays and Sundays of the month = 9 days    31 - 9 = 22 days. With an "echo" to show it...
asked by 15.12.2016 / 23:30
1
answer

Generate a SELECT to verify the success of a game of chance with MySQL

I have the following tables. Table JUGADOS | Field | Type | Null | Key | Default | Extra +------------+------------------+------+-----+---------+---------------- | FECHA | date | YES | | NULL...
asked by 04.01.2017 / 20:36
1
answer

Get the day of the week from a date taken from sqlite swift

I'm doing a function in swift that you formatted me on a date I get from the database sqlite and display it with the following format: Miércoles, 07 de septiembre de 2016 a las 10:03:56 . I have almost everything, I just n...
asked by 07.09.2016 / 10:35
1
answer

compare two dates in php

I have a date: ($data->fch_fin_prevista) with this format: 2017-11-29T00:00:00.000Z and I transform it in this way to the format I want: $data->fch_fin_prevista=date('d/m/Y',strtotime($data->fch_fin_prevista)); To st...
asked by 28.09.2018 / 12:01
2
answers

Insert current date in a mysql table - php

I have a question about inserting the current date in a row into a mysql table in case there is no such record. Example: Insert 2017-10-10 in a row if it does not exist. But insert a new record in case it's another day like tomorrow (2017-10-11)...
asked by 10.10.2017 / 21:25
2
answers

Datediff gives me a Boolean value when comparing two dates

I have a login.php in which a user is valid, and if it is the correct one, I open the session. The code is as follows: if (password_verify($pass,$resultado)) { session_start(); $_SESSION['nic...
asked by 09.07.2017 / 10:03
1
answer

How to convert the date and time into a text? Android Studio

for example: 03/28/2018 10:57:24 and when registering or updating it is appreciated: "A moment ago", "An hour ago" in the xml     
asked by 28.03.2018 / 17:59