Unanswered: Selecting split period of date and time
select * from table where datetime between '.....' and '.....'
now i split it up datetime format in my user-interface and display year,month,day,hour,minute,second using select query.
select DATE_FORMAT(datetime,'%Y') as Year -(similarly for Month and Day)
select TIME_FORMAT (datetime,'%H') as Hour- (similarly for Minute and Second)
how to use the same 'select * from table where .......(what to write??) between ........(so-and-so Year,Month,Day,Hour,Minute,Second) and .......(and so-and-so Year,Month,Day,Hour,Minute,Second)' logic for these split values?