The first thing you have to do is tell us what error you're getting. The second thing you have to do is read the PyS60 Library Reference, the section about the logs module, to see for yourself how things are done.
Try this code:
m["time"] and d are Unix timestamps. time.localtime() generates a tuple from them. We then compare the first 3 elements of the two tuples (year, month and day) and if they match, show the number.
import appuifw, logs, time
d=appuifw.query(u"type a date:","date")