Questions tagged as 'datetime'

5
answers

Check if day exists in the month

I need to check / validate if a (numeric) day exists in a given month. For example: I have day 31 , and since it does not exist in the month of February the condition will fail. I think a simple if will solve the problem, wher...
asked by 07.02.2014 / 16:47
3
answers

Add custom timezones in PHP?

TL; DR Is there any way to add custom timezones in PHP? Objective I would like to be able to record a timezone (using new DateTime(...) ) with an arbitrary timezone value, such as 13 minutes , 51 minutes , or 3 hours and...
asked by 12.01.2014 / 07:06
3
answers

Remove Saturdays and Sundays from Calculation

I have a project where I work with project activities, my activities have a certain time to complete, but the project has to do the calculation only with administrative days. For example, an activity starts on 10/26/2015 (Monday) and its dura...
asked by 25.10.2015 / 19:22
3
answers

Retrieve local time and date of an arbitrary day in an arbitrary timezone, considering daylight saving time

I want to show the day, hour, minute, etc. in an arbitrary timezone, on an arbitrary day. How to talk about timezone conversion is always difficult and confusing, and how to talk about timezone conversions in JavaScript is even more difficult...
asked by 06.02.2014 / 00:13
5
answers

Today (06/30/2015) we will have a second more, what can be the consequences for our systems?

If someone does not know, today 30/06/2015 will have a second more. That is, today after the 23h59m59s we will have 23h59m60s ! This is to do the correction of the International Atomic Time. I know that there are severa...
asked by 30.06.2015 / 22:07
3
answers

How to get the format in hours when it exceeds 24?

I'm developing a system in PHP where I need to at some point get the total time of an audio file. This time is saved in the database in seconds and also in the time format. The problem is that when you format these times through the seconds s...
asked by 24.02.2015 / 02:54
3
answers

Convert date of type 2016-10-04 15:51:16 to, 04-10-2016 15:51:16 in SQL or PHP how to do?

I am doing a job to show the date and time of the insertion in the script in the database, I have to show the date in dd-mm-yyyy format and then the time, how can I do this by the SELECT of the script or by the PHP? If so, how can someone help m...
asked by 10.10.2016 / 16:58
4
answers

"Date.now ()" equivalent of Javascript in C #?

Here talks about getting milliseconds using Date.now(); , which returns something like 1533144170651 . Follow his documentation:    The now () method returns the milliseconds since 1 January   1970 as of 00:00:00 UTC so far...
asked by 01.08.2018 / 19:38
6
answers

How do I get the current date and add "n" minutes to this value?

I can get the current date simply with new Date() , but how do I add a few minutes to this value? If there is a way to add milliseconds, it can be too.     
asked by 29.01.2014 / 17:00
3
answers

How to know which DATETIME format used in a particular SQL Server column?

I have a table in SQL Server and one of the fields was created as DATETIME . As I can tell, via query or SQL Server Studio , what is the default format used of this DATETIME in my SQL Server ?     
asked by 15.04.2015 / 14:11