Questions tagged as 'datetime'

1
answer

How to pass dates in Java to a database?

I'm trying to pass a date in "yyyy/MM/dd HH:mm:ss" format to the database so I'm using Date() and SimpleDateFormat() , however it returns me a string . Is there any way I can return a date or if there is any conversion to it...
asked by 16.03.2015 / 15:09
4
answers

Convert String to Decimal

And I'm having trouble correctly converting this string to decimal . decimal.Parse(txtValor.Text)=meuVen.Valor; When I place the conversion in front, it shows error after = . I do not know how to convert the second part,...
asked by 13.09.2015 / 09:02
2
answers

How to sum several date ranges as php [duplicate]

I have a problem with the sum of dates. I have several events that are registered in the bank with start date and end date, I need to know the time interval between these events and add these intervals to know the total time that these events...
asked by 22.06.2015 / 22:55
3
answers

How to convert date in dd / mm / yyyy format?

Once I published my app, I started getting the dates in American format like this: 9/14/2016 12:00:00 AM How to format for dd/MM/yyyy ? I tried convert.ToDateTime() more does not work.     
asked by 14.09.2016 / 18:11
6
answers

How to turn string into time in PHP?

I have 2 strings that represent times. How to calculate the difference between the two. $string1 = "12:04:32"; $string2 = "18:07:34";     
asked by 14.10.2015 / 20:50
2
answers

Remove a quantity N of days on a date

How can I remove a quantity of N days on a date? Example: namespace TesteData { class Program { static void Main(string[] args) { var dataAtual = DateTime.Now.Date; // dataAtual 13/09/17 var qtdDias = 5;...
asked by 13.09.2017 / 22:25
1
answer

Convert.ChangeType converts data wrongly

The method Convert.ChangeType is converting the date in the wrong way I expect 24/02/2015 and comes 23/02/2015 . Does anyone know why? Code sample: using System; using System.Globalization; namespace ConsoleApplication4...
asked by 16.03.2015 / 17:56
2
answers

Date and Time in Datetime format

How do I concatenate these two variables to stay in ISO format (Y-m-d H: i: s)? $data = '17-04-2018'; $hora = '16:12';     
asked by 17.04.2018 / 17:15
2
answers

Does the DateTime class of PHP support date creation in the Brazilian format?

In the following code echo will be printing +273 days, but would not it be +9 days ? $datetime1 = new DateTime('01/04/2018'); $datetime2 = new DateTime('10/04/2018'); $interval = $datetime1->diff($datetime2); echo $interval->format('%...
asked by 06.04.2018 / 20:57
2
answers

Plot hourly time series on a defined scale

I have a time series serial record, and I'm having trouble plotting on an appropriate scale. Here's an example: #Gerar sinal v1 v1=sin(seq(from=0, to=3*2*pi, length=11060)) #Gerar sinal v2 v2=sin(seq(from=0, to=5*2*pi, length=11060)) #G...
asked by 23.11.2017 / 14:22