Questions tagged as 'datetime'

1
answer

How do I calculate with 3 variables of type DateTime?

I have these 4 variables: public System.DateTime TempoOtimista { get; set; } public System.DateTime TempoProvavel { get; set; } public System.DateTime TempoPessimista { get; set; } public System.DateTime TempoRevisado { get; set; } TempoRevis...
asked by 14.10.2015 / 03:21
3
answers

Help with SqlQuery in context Entity Framework

I need to make a return of my database in a specific way, however I have a problem, the situation is as follows: I have this query already tested directly on SQL Server , and it is working perfectly: SELECT COUNT (ate.id) AS data,...
asked by 13.11.2018 / 16:28
2
answers

Parsing a timestamp with timezone

I was making a small code to implement a treatment case in a friend application module and got stuck with a problem. This is a unit test. To put in the application module I would have to make some adjustments when inserting into the native co...
asked by 01.05.2018 / 02:36
1
answer

I would like to assign yesterday's day as Start Date every time my program was started in a dateTimePicker

I can assign value to it just do not know how to assign a yesterday private void Form1_Load(object sender, EventArgs e) { dateTimePicker1.Value = DateTime.Today; }
asked by 24.08.2018 / 16:18
1
answer

SQL Converter minutes to hour: minute: seconds

How to convert a value in minutes in oracle to the format hour: minutes: seconds?     
asked by 29.02.2016 / 13:40
2
answers

Doing operations / handling DateTime

The idea is for the user to type in a textbox a horaEntrada and in another the horaSaida in which case these 2 variables should have the format "HH: mm" hours and minutes, only, after that by method get and set...
asked by 03.11.2016 / 22:03
1
answer

Default value for column of type Datetime

I have a table that has the DataRegistro field of type Datetime . I am using EntityFramework to generate the database ( I am not using the code first ) and I am adding the Computed property so that the column is populated automati...
asked by 01.09.2015 / 03:52
1
answer

Error in DateTime attribute in C # writing to MySQL

I am trying to insert into MySQL database the date of birth of the user, in C # the attribute date_match is of type DateTime and in MySQL the attribute date_match is of type Date , to insert C # I am doing doing so: DateTime nasci...
asked by 28.04.2016 / 13:34
2
answers

Formatting String with DateFormat using a TimeZone is not working

In my web service, there is an endpoint that returns me a timestamp in UTC and I have a method that generates a date formatted from this timestamp: formatDate(1432313391, "UTC"); public String formatDate(long date, String time...
asked by 22.05.2015 / 19:11
2
answers

Generate random number with current date and time value with Javascript

I would like to know how to generate a random number, based on the current date and time value, using Javascript. I could not get a real example to show here, because I really do not know how to do it.     
asked by 02.05.2015 / 02:48