开发者

how to find earliest date and latest date from database

开发者 https://www.devze.com 2023-04-03 12:51 出处:网络
i want to perform email functionality in my app.In that in subject i have to add earliest date in database and latest date in database.so how can i get earliest date and latest date from databas开发者

i want to perform email functionality in my app.In that in subject i have to add earliest date in database and latest date in database.so how can i get earliest date and latest date from databas开发者_开发问答e?I have database fields like EntryDate which is datetime datatype Amount LastEdited with datetime datatype.


You need to run a query to sort date..like

SELECT TaskDate FROM MyTask Order By TaskDate limit 1
SELECT TaskDate FROM MyTask Order By TaskDate Desc limit 1

First one will give u oldest date and second will give the latest date. hope this will help u out.

0

精彩评论

暂无评论...
验证码 换一张
取 消