Bonjour,

j'essaye d'afficher le nombre de jours avant le prochain anniversaire d'un contact. Je pensais construire ma requête de la façon suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
		String[] projection = new String[]
		{
			ContactsContract.Contacts.DISPLAY_NAME,
			ContactsContract.CommonDataKinds.Event.START_DATE,
			"strftime('%d', strftime('%Y', 'now') || strftime('-%m-%d', " + ContactsContract.CommonDataKinds.Event.START_DATE + ")) - strftime('%d', 'now') AS nb_day"
		};
Mais j'obtiens l'erreur suivante : java.lang.IllegalArgumentException: Invalid column strftime('%d', strftime('%Y', 'now') || strftime('-%m-%d', data1)) - strftime('%d', 'now') AS nb_day