---
title: "dateadd"
type: "forum-thread"
url: "https://www.webforum.nu/amne/databaser-sql/74290-dateadd"
topic: "Databaser & SQL"
topic_url: "https://www.webforum.nu/amne/databaser-sql"
author: "jboy_87"
published: "2003-04-17T00:51:07.000Z"
updated: "2003-04-18T12:47:35.000Z"
replies: 3
views: 199
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/databaser-sql/74290-dateadd"
---

# dateadd

## #1 — jboy_87, 2003-04-17T00:51Z

från mssql till mysql?

```
connect.execute "update Medlemmar set Upptagen = '0', Borta = '0', " &_
"minonline = '0', minonline2 = '0' ,privatchat = '0'"&_
"where dateadd(Minute,[minonline2],[Start]) <= getdate()",,128
```

Permalänk: https://www.webforum.nu/p/74290

## #2 — LarsG, 2003-04-17T08:44Z

```
connect.execute "update Medlemmar " &_
" set Upptagen = '0', Borta = '0', " &_
"minonline = 0, minonline2 = 0 ,privatchat = '0'"&_
" where  start  + minonline2*60 <= now()",,128
```

Permalänk: https://www.webforum.nu/p/1015397

## #3 — jboy_87, 2003-04-17T16:16Z

tack men man blir utloggad ibland konstigt?

Permalänk: https://www.webforum.nu/p/1015725

## #4 — jboy_87, 2003-04-18T12:47Z

löste det så här
"where date_add(start, interval minonline2 minute) \<= current_timestamp"

Permalänk: https://www.webforum.nu/p/1016378

---

Tråden på webben: https://www.webforum.nu/amne/databaser-sql/74290-dateadd
