Mercurial > urweb
comparison tests/time.ur @ 438:1c27f03d9bd2
Reading timestamps from SQL
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 30 Oct 2008 14:57:15 -0400 |
parents | 1a4c1b5f4d8f |
children | 322c8620bbdf |
comparison
equal
deleted
inserted
replaced
437:1a4c1b5f4d8f | 438:1c27f03d9bd2 |
---|---|
1 table t : { Id : int, Time : time } | |
2 | |
1 val now : time = readError "10/30/08 14:35:42" | 3 val now : time = readError "10/30/08 14:35:42" |
2 val later : time = readError "10/30/08 14:37:42" | 4 val later : time = readError "10/30/08 14:37:42" |
3 | 5 |
4 fun main () = return <xml>{[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]}</xml> | 6 fun main () = |
7 xml <- queryX (SELECT * FROM t) | |
8 (fn r => <xml>{[r.T.Id]}: {[r.T.Time]}<br/></xml>); | |
9 return <xml><body> | |
10 {xml} | |
11 {[now]}, {[now = now]}, {[now = later]}, {[later < now]}, {[now < later]} | |
12 </body></xml> |