<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "用 Excel 計算經過時間"]]></title>
		<link>https://forum.andowson.com/posts/list/5.page</link>
		<description><![CDATA[Latest messages posted in the topic "用 Excel 計算經過時間"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>用 Excel 計算經過時間</title>
				<description><![CDATA[ 雖然Excel跟網頁程式設計比較無關，不過由於碰到了驗算的需求，用Excel是個滿方便的選擇。 
<br>
問題如下：如果某項服務的計費方式採用以分計費，則我們需要紀錄每個客戶的開始時間及結束時間，例如以登入時間跟登出時間為準，則經過時間即可依此計算 
<br>
elapse_time=end_time-start_time=logout_time-login_time 
<br>
用SQL語法應該是滿容易的 
<br>
select logout_time-login_time as elapse_time from userlog where ... 
<br>
但是客戶如果跟你「灰」時，你拿出你精心寫出的SQL語法跟資料庫裡的資料給他看嗎？ 
<br>
又你如何「證明」你算出的資料是對的？用筆算嗎？時間的相減雖然是國小數學就教過了，但一次要作個幾百題還真的是會出錯哩。 
<br>
那Excel可以派上用場嗎？將開始時間輸入在A2，然後結束時間輸入在B2，再到C2來個=B2-A2計算出經過時間這樣嗎？ 
<br>
答案是可以的！而且很簡單，江湖一點訣，講破還真的就不值錢了！ 
<br>
就是把A2和B2格式設為文字而C2格式設為自訂的d hh:mm:ss即可。 
<br>
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/49/64.page</guid>
				<link>https://forum.andowson.com/posts/preList/49/64.page</link>
				<pubDate><![CDATA[Mon, 26 Feb 2007 00:26:16]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>