Questions tagged as 'datetime'

1
answer

Error showing time passed from multiple posts in PHP

<?php function timeAgo($time_ago){ $cur_time = time(); $time_elapsed = $cur_time - $time_ago; $seconds = $time_elapsed ; $minutes = round($time_elapsed / 60 ); $hours = round($time_elapsed / 3600); $days = round($time_elap...
asked by 25.07.2015 / 16:17
1
answer

Convert string to DateTime C # [duplicate]

How do I get a string something like "01/30/2015", for example, and convert it to datetime and keep that same date format? Being able to validate the date.     
asked by 13.10.2015 / 21:14
1
answer

Reporting

Good Night, it must be simple, but I'm breaking my head and it's not going. I made a report of the college project "Pieces in Stock" and it is working perfectly. When I ran the tests the DateTime with the time was reset, then I set the...
asked by 04.05.2015 / 03:38
1
answer

How do I set Nothing to a DateTime variable?

I have a function that gets a string and is converted to date time, I made a check for when empty string , return Nothing . But when it exits the function it is returning the date in this format #12:00:00 AM# , what I want is that...
asked by 13.07.2015 / 18:31
2
answers

Subtract dates and compare with value

I have two dates: DataAcesso and DataAtual of type DateTime . I have one more field called TempoAtualizacaoAutomatica of typo byte . I need to subtract these dates and compare the result with TempoAtualizac...
asked by 29.12.2014 / 12:47
2
answers

Error: "unexpected T_STRING" in PHP [closed]

I took an internet function to calculate the difference between the dates. I created a class to make it easier, because I'm going to use this function in other screens. PHP Version: 5.2. * Code calling the class: include("funcoes/dat...
asked by 20.02.2014 / 13:46
2
answers

Problem Handling LocalDate Dates

I'm making an application for work calculations. I need to receive two dates and know the amount of days / months / years. Ex: 08/03/2017 to 07/03/2018 is for 12 months accurate, in my code of 11 months and 27 days someone knows how to fix it....
asked by 07.03.2018 / 23:40
2
answers

Zeroing datetime time with SQL

Today my SELECT returns the following date: 2017-11-16 10:37:16.000 I would like to return 2017-11-16 00:00:00.000 , can you help me with this formatting?     
asked by 17.11.2017 / 19:09
1
answer

Short date submission not working abbreviated asp.net mvc

I am creating a form in ASP.NET MVC and creating the field "DataMessage", at first I put the TextBox to load a date with the month in full, as below: Image of the form with the field "Message date" containing the month in full. Be...
asked by 28.06.2017 / 19:26
1
answer

Change date to commercial date (MySQL)

I need to change the Date of my database, considering the Business Date used in the company I work for. Here, a business month is between 26/M-1/AAAA and 25/M/AAAA . Where M-1: last month. For example, today the trade date is...
asked by 04.09.2017 / 21:31