Adicionado Adicionado Classe TipoLog
[simdecs.git] / src / java / org / ufcspa / simdecs / comunicacao / util / UtilitarioSql.java
... / ...
CommitLineData
1/*\r
2 * To change this template, choose Tools | Templates\r
3 * and open the template in the editor.\r
4 */\r
5package org.ufcspa.simdecs.comunicacao.util;\r
6\r
7import java.text.SimpleDateFormat;\r
8import java.util.Date;\r
9\r
10/**\r
11 *\r
12 * @author pbarros\r
13 */\r
14public class UtilitarioSql {\r
15 \r
16 \r
17 public void UtilitarioSql()\r
18 {\r
19 }\r
20 \r
21 public java.sql.Date converteDataUtilToSql(Date data) {\r
22 SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");\r
23 Date dataUtil = data; \r
24 java.sql.Date dataSql = null;\r
25 try { \r
26 dataUtil = new java.sql.Date(dataUtil.getTime()); \r
27 dataSql = (java.sql.Date) dataUtil; \r
28 \r
29 } catch (Exception e) { \r
30 //JOptionPane.showMessageDialog(null, "Erro ao converte data para sql: " + e.getMessage()); \r
31 }\r
32 return dataSql; \r
33 }\r
34 \r
35}\r