Questions tagged as 'datetime'

2
answers

How to format a DateTime field in the Brazilian format dd / MM / yyyy?

I would like to format the DataAfr and DataTrm fields of type DATETIME , in Brazilian date format dd / MM / YYYY instead of the American format yyyy-mm-dd hh: mm: ss SELECT e.NmrCnt AS [Contrato] ,e.NmrSeri...
asked by 21.09.2016 / 14:55
2
answers

Convert string to DateTime in LINQ

I have a model where all fields are string . I want to convert to DateTime and Double For this I created a new model public class CPUStats { public DateTime Data { get; set; } public Double? Disco { get; s...
asked by 16.03.2016 / 14:41
3
answers

Subtract date and display in YEARS, MONTHS and DAYS

DBMS: MySQL Problem: How do I return the subtract of the current date with a specific date and return the value in YEARS, MONTHS and DAYS in a query? Example: DADOS DataAdmissao dataAtual 2010-04-07 2014-06-27 (este dado não está...
asked by 27.06.2014 / 21:33
2
answers

Check if the previous day is a holiday and / or Sunday

I'm having trouble developing a date validation logic. The variable dataFecha is called with -1 day to already validate the previous day. But when I test the validations, he did not subtract (-1) day in the variable, to validate the Sa...
asked by 13.12.2017 / 12:43
2
answers

Remove "/" from a DateTime.ToShortDateString ();

I'm implementing a program using C # with .NET 3.5 I have the following code: StringBuilder sb = new StringBuilder(); sb.Append(caminhoSalvarCobranca); sb.Append(@"\Boleto "); sb.Append(boleto.Sacado.Nome); sb.Append(boleto.Boleto.DataVenci...
asked by 28.05.2014 / 18:31
4
answers

Plugin bootstrap-material-datetimepicker disable days of the week

I'm using the Timepicker plugin called bootstrap-material-datetimepicker: ( link ). I'd like to be able to turn off some days of the week, or just turn on Wednesdays and Fridays but I can not, can someone give me a hand? Thank you     
asked by 20.04.2016 / 10:55
2
answers

timediff () limited to 838: 59: 59, how to solve?

DBMS: MYSQL Problem: I am adding HOURS to a TIME field type, and the expected result is above 838: 59: 59, but it is visible only up to this limit. How to solve? SELECT he.empresa, SEC_TO_TIME(SUM(TIME_TO_SEC(CASE WHEN time...
asked by 14.04.2014 / 19:30
1
answer

Disable dates before the current day in DateTimePicker?

Is it possible in DateTimePicker , disable the days before the current day?     
asked by 07.08.2015 / 18:58
1
answer

How to convert a value in UNIX type Timestamp to DateTime?

How to convert a value to type UNIX timestamp (seconds since 1970) , example 1396148400 , in a DateTime ?     
asked by 13.04.2014 / 01:01
2
answers

Compare date time with a timespan

In asp mvc 4, I'm doing a query where I'll get the data where hours are less than or equal to those entered by the user. That is, I have a dateTime and I check with the variable entered by the user (a TimeSpan ) if it is lowe...
asked by 18.03.2014 / 16:11