dimanche 12 juillet 2015

want to compare user input time with my sqlite table time column in android

i want to compare user input time with my sqlite table time column like where user input time store in hour_x,minute x

        @Override
        public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
              hour_x = hourOfDay;
              minute_x = minute;
              settime.setText(hour_x+":"+minute_x);
        }

and i have many time column in table like

hellodb4.execSQL("create table " + TABLE_NAME +" (STATION TEXT,TIME TIME,TIME TIME,TIME TIME)");
hellodb4.execSQL("INSERT INTO time_table  VALUES ('STN1','03:35','03:55','03:57');");
hellodb4.execSQL("INSERT INTO time_table  VALUES ('STN2','06:30','06:55','06:57');");

SO I want to compare like when user select any time then it should compare with All 'TIME' column as user_input time>='TIME' Column.

Aucun commentaire:

Enregistrer un commentaire