Java tutorial
//package com.java2s; //License from project: Open Source License import android.widget.TimePicker; public class Main { /** * @param timePicker * @return time as milliseconds since 00:00:00:000 (midnight) */ public static long getTime(TimePicker timePicker) { int h = timePicker.getCurrentHour().intValue(); int m = timePicker.getCurrentMinute().intValue(); return (h * 3600 + m * 60) * 1000; } }