Formatar Data no MVC C# dd/MM/yyyy

Ĉ¿

Deveremos acessar a pasta Model, depois abrir a Classe especifica

Exemplo TB_EXEMPLO_LTECNO.cs

E depois acrescentar a formatação em cima do campo data que desejar.

  [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]


//inicia

  public partial class TB_EXEMPLO_LTECNO
    {
        public long ID { get; set; }

        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public Nullable<System.DateTime> DT { get; set; }

        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public System.DateTime DT_AGENDA { get; set; }
        public string UNI_CODIGO { get; set; }
        public string UNI_DESCRICAO { get; set; }
        public string ESP_CODIGO { get; set; }
        public string ESP_DESCRICAO { get; set; }
        public string PROF_CRM { get; set; }
        public string PRO_NOME { get; set; }
        public string TIPO_VAGA { get; set; }
        public Nullable<int> QTDE { get; set; }
        public string LIBERADO { get; set; }
        public Nullable<int> QTD_LIBERADA { get; set; }
        public Nullable<int> QTD_REALIZADA { get; set; }
        public string LISTA { get; set; }
    }
//finaliza

Desta forma quando utilizar o campo na View o mesmo irá aparecer formatado.

Exemplo na View

@Html.DisplayNameFor(model => model.DT_AGENDA)

Comandos git do dia a dia

Ĉ¿ #Criando um projeto do zero echo "# UBBOAT_App" >> README.md git init git add README.md git commit -m "first commi...