Mercurial > urweb
comparison tests/sqliteTime.ur @ 1352:703c2c94afd5
Use proper string time format for SQLite
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Mon, 20 Dec 2010 13:22:44 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1351:74d35d9a5d16 | 1352:703c2c94afd5 |
---|---|
1 table dates : { Date : time } | |
2 | |
3 fun aform () = | |
4 let | |
5 val a : time = readError "01/02/03 04:06:07" | |
6 in | |
7 dml(INSERT INTO dates (Date) VALUES ({[a]})); | |
8 ds <- queryX (SELECT * FROM dates) | |
9 (fn r => <xml>{[r.Dates.Date]}<br/></xml>); | |
10 return <xml><body>{ds}</body></xml> | |
11 end | |
12 | |
13 fun main () = | |
14 return <xml><body><form><submit action={aform}/></form></body></xml> |