ciao ragazzi, con SimpleDateFormat c'é un modo per farmi restituire la data in inglese al posto di in italiano?
ciao ragazzi, con SimpleDateFormat c'é un modo per farmi restituire la data in inglese al posto di in italiano?
Walk fast, chew slowly.
"We used students as subjects because rats are expensive and you get too attached to them"
SimpleDateFormat format = new SimpleDateFormat("pattern", Locale.ENGLISH)
Ciao,
se non trovi nulla di meglio, visto e considerato che ritorna una stringa separata da"/" se non erro basta che utilizzi il metodo StringTokenizer e usi come separatore"/" e dividi la data in tre stringhe (mese,giorno,anno) e te le sistemi come vuoi così da ottenere la data inglese...
Ciao
Powered by MacOSX Lion
è sicuramente meglio il metodo di floyd...
Ciao
Powered by MacOSX Lion
grazie ad entrambi, suppongo che by now dovrei saperlo, ma se mi dice cannot resolve symbol Local che faccio? Spero di non abusare della vostra pazienza
Walk fast, chew slowly.
"We used students as subjects because rats are expensive and you get too attached to them"
scrivi Locale
scusa sbagliai a postare...a parte che sono su una tastiera tedesca che hanno la y al posto della z che mi fa saltare i nervi...comunque anche Locale non gli piace
Walk fast, chew slowly.
"We used students as subjects because rats are expensive and you get too attached to them"
importa il package java.util.*
l'idea mi era balzata alla testa, ma l'import del java.util.* fino ad ora l'avevo evitato siccome quando l'importo ho ora visto che per quanto riguarda il locale lo prende senza errori, ma poi arriva al mio statement
Date today = new Date();
e sdeng! mi dice che sono ambiguo, both class java.util and class java.sql.Date in java.sql match. Che storie.
Dheee...help!
Walk fast, chew slowly.
"We used students as subjects because rats are expensive and you get too attached to them"
java.util.Date today = new java.util.Date();
ma prova anche
import java.util.*;
import java.util.Date;