diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sqliteTime.ur	Mon Dec 20 13:22:44 2010 -0500
@@ -0,0 +1,14 @@
+table dates : { Date : time }
+
+fun aform () =
+    let
+        val a : time = readError "01/02/03 04:06:07"
+    in
+        dml(INSERT INTO dates (Date) VALUES ({[a]}));
+        ds <- queryX (SELECT * FROM dates)
+                     (fn r => <xml>{[r.Dates.Date]}<br/></xml>);
+        return <xml><body>{ds}</body></xml>
+    end
+
+fun main () =
+  return <xml><body><form><submit action={aform}/></form></body></xml>