Questions tagged as 'datetime'

2
answers

Format Display Data DisplayFor

I have a field in the database, DataHora, and wanted to display on the screen for the user, but in separate fields, being Date and Time. First displays the Date @Html.DisplayFor(modelItem => item.DataHora) Second displays Time @Html...
asked by 01.11.2016 / 03:02
1
answer

How can I get the current date and time in #R?

I am creating a process report from a routine, a simplified "logfile", and would like to store the date at the time of the error in a variable. What function does the current date and time result in #R?     
asked by 08.03.2016 / 09:55
4
answers

How do I reset the time and decrease one day of a DATETIME?

I have a field DATETIME that I get from SQL, format YYYY-mm-dd H-m-s and I need to zero the time and decrease one day. I'm getting a day off by using date_modify($date, '-1 day'); , but how do I reset the time?     
asked by 21.03.2014 / 14:45
1
answer

How to compare two dates in Javascript or jQuery

I'm trying to compare two dates coming from fields text , turning them into object Date , as follows (the first function is to format the field input with XX/XX/XXXX ): function formatar(mascara, documento){...
asked by 07.06.2015 / 01:11
1
answer

Convert String from a JTextField to Calendar

How to perform input conversion through Swing's JTextField via JDBC? public class DadosPessoais { private Calendar dataNascimento; public Calendar getDataNascimento() { return dataNascimento; } public void setDataNasc...
asked by 12.06.2016 / 03:30
3
answers

How to transform a date into a string format with no signs in DateTime?

Examples: string data = "08072013"; string hora = "1515"; Is there a specific method for this type of format? I tried to use Convert.ToDateTime() , DateTime.Parse , etc. and everyone returned an exception. I'm currently doing th...
asked by 01.07.2014 / 22:43
2
answers

Full return of Date type

How do I get this return? 2014-08-05 18: 29: 47.757 Using Date . Date data = new java.sql.Date(new java.util.Date().getTime()); Using this my return is only 2015-02-03 and does not return the hours. NOTE: I need to get...
asked by 03.02.2015 / 15:14
4
answers

Difference between two dates, ignoring weekend - working days only [duplicate]

I was looking for something similar, but unfortunately I did not find anything. I found this solution that helped me a lot but it's in Java. How to calculate the difference between two dates by ignoring the weekends in Java without using l...
asked by 14.06.2016 / 19:04
2
answers

Format date in java

I need to format a date that comes up for example: 20161109103000 to 2016-11-09 10:30:00 . I've tried using SimpleDateFormat , DateTimeFormatter and could not format the date.     
asked by 22.08.2017 / 15:31
2
answers

How to change the PHP DateTime JSON serialization format?

In PHP, when I use a json_encode in an object of type DateTime , it has the following result: $date = new DateTime(); echo json_encode(compact('date'), JSON_PRETTY_PRINT); Output: { "date": { "date": "2018-08-09...
asked by 09.08.2018 / 19:01