Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

insertion d'une date

Featured Replies

Posté(e)

Il n'y a pas de champ date en Sqlite. On peut insérer la date un peu comme on veut.

J'ai opté pour le long en millisecondes :

int year = 2012;
int month = 11;
int day  = 25;
GregorianCalendar cal = new GregorianCalendar(year, month, day);
long date = cal.getTime().getTime();

Et pour relire, on fait l'opération inverse :

// Lire date (long) depuis la base
int day, year, month;
GregorianCalendar cal = new GregorianCalendar();
cal.setTimeInMillis(date);
day = cal.get(GregorianCalendar.DAY_OF_MONTH);
month = cal.get(GregorianCalendar.MONTH);
year = cal.get(GregorianCalendar.YEAR);

On peut aussi stocker la date en texte et utiliser les fonctions Sqlite pour la relire correctement.

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.