Si conviertes un textbox en Datetime y quieres mantener el formato 24horas lo unico que debes hacer es cambiar la hh por HH. por ejemplo

 

 

string fechainiciomysql = string.Format(«{0:yyyy-MM-dd HH:mm:ss}», Convert.ToDateTime(fechainiciotext.Text));

Esto seria fecha en formato 24H

y esto en 12h

string fechainiciomysql = string.Format(«{0:yyyy-MM-dd hh:mm:ss}», Convert.ToDateTime(fechainiciotext.Text));

 

Saludos.

Por admin

Deja una respuesta

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO