<<>Problem>:
我的表格中的一些领域有错的格式,使用日期重新编排。 C#中的方法,但i 做了打字,如:MM/dd/yyyh:mm/ss tt。
现在,如果你仔细看一下:MM/dd/yyyy hh:mm ->/ <-- ss
∗∗∗∗∗
在此之前,我先在我的正文法典中加以规定(一些价值观的形式是:MM/dd/yyyh:mm:s tt)
问题在于,试图从表格中选择按日期顺序的数值(即只能按日期划分),因为有些领域采用错误的形式,有/有
What i have Tried:
现在,一幅数字表示,因为时间总是在同一地点(而且对我来说是什么事项),即只能按时间顺序排列编号;一是AM,然后是PM。
我可以命令MID([ColumnName],11,2)、MID([ColumnName],14,2)、MID([ColumnName],16,2)因为无论哪一个日期都总是采用M/dd/yyyy hh/mm/s tt的形式。
So I Tried:
(
SELECT SN, StatusCode, Time, Mid(Time,14,2) + : + Mid(Time,17,2) AS TTI
FROM OrderStatus
WHERE StatusCode = Finished and Left(Time,10) = 4/20/2012
AND Time LIKE *AM
ORDER BY Val(Mid([Time],11,2)) DESC
)
UNION ALL (
SELECT SN, StatusCode, Time, Mid(Time,14,2) + : + Mid(Time,17,2) AS TTI
FROM OrderStatus
WHERE StatusCode = Finished and Left(Time,10) = 4/20/2012
AND Time LIKE *PM
ORDER BY Val(Mid([Time],11,2)) DESC
);
Just to see if that would Order it by hour but it doesn t it gives me this :
你们可以看到(在实地)01时,02时,然后回头看......?
https://stackoverflow.com/questions/9411827/ordering-a-union-query-in-ms-access-sql” 如果你回答这个问题或回答这个问题,那么你就会感到羞耻,这也有助于了解其他情况。
Edit: The Question that i really want answered how to sort by a Substring of a string; sorry for the late edit i could of swore i changed this already, say i want to sort by a single digit of any string / date / anything i was wondering how i can do something like: Order By Val(Mid(ColumnName,StartPos,EndPos))
<>说明: 该法令 结果是完全错误的。