From 640700d39158db83e0445a8146313eba3ff2c834 Mon Sep 17 00:00:00 2001 From: Eduardo Trujillo Date: Fri, 3 Apr 2015 23:08:35 -0400 Subject: [PATCH] Add an example with time --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 26edcaa0..0c4ea83a 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,11 @@ db.Where("name LIKE ?", "%jin%").Find(&users) // AND db.Where("name = ? and age >= ?", "jinzhu", "22").Find(&users) + +// Time +db.Where("updated_at > ?", lastWeek).Find(&users) + +db.Where("created_at BETWEEN ? AND ?", lastWeek, today).Find(&users) ``` ### Query With Where (Struct & Map)