Pessoal
Parece besta a pergunta, mas deu um branco !
Como eu faco para criar um objeto do tipo Calendar sem pegar a data do sistema ?
Eu nao posso utilizar a data do sistema por nada !
Obrigado
Pessoal
Parece besta a pergunta, mas deu um branco !
Como eu faco para criar um objeto do tipo Calendar sem pegar a data do sistema ?
Eu nao posso utilizar a data do sistema por nada !
Obrigado
ueh… se nao vai pegar a data do sistema entao vai pegar de algum outro lugar… q data vc vai informar??? tah vindo do banco??? tah vindo de onde???
Constructor Summary
GregorianCalendar()
Constructs a default GregorianCalendar using the current time in the default time zone with the default locale.
GregorianCalendar(int year, int month, int dayOfMonth)
Constructs a GregorianCalendar with the given date set in the default time zone with the default locale.
GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, int minute)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second)
Constructs a GregorianCalendar with the given date and time set for the default time zone with the default locale.
GregorianCalendar(Locale aLocale)
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.
GregorianCalendar(TimeZone zone)
Constructs a GregorianCalendar based on the current time in the given time zone with the default locale.
GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.
também pode cria usando o getInstance() para criar e depois setar uma data qualquer com setTime()
A data vem do banco !!
Perai mas qual a tua necessidade e tua duvida explica melhor ai pra nos.
Abraços
//Popula o resulset ...
ResultSet rs = statement.executeQuery();
Calendar c = Calendar.getInstance();
c.setTime(rs.getDate("NOME_DO_CAMPO_DATA"));
mas manda a sua necessidade ai pra gente ver se não da pra fazer melhor (sempre dá…
)
o problema esta na hora tb que vem do banco e nao so a data !!