コード例 #1
0
 public static DateTime Data_Servidor()
 {
     try
     {
         object data = new TDataQuery().executarEscalar("set dateformat dmy SELECT GETDATE()", null);
         return(Convert.ToDateTime(data.ToString(), new System.Globalization.CultureInfo("pt-BR")));
     }
     catch
     { return(DateTime.Now); }
 }
コード例 #2
0
 public static bool Data_Servidor(ref DateTime dt_servidor)
 {
     try
     {
         object data = new TDataQuery().executarEscalar("set dateformat dmy SELECT GETDATE()", null);
         dt_servidor = Convert.ToDateTime(data.ToString(), new System.Globalization.CultureInfo("pt-BR"));
         return(true);
     }
     catch
     {
         dt_servidor = DateTime.Now;
         return(false);
     }
 }