Question: I have one-to-many relation between tables user and tag:

```
Users:
id    username
--------------
 1    Bob     
 2    Alice   
 3    Eve   

Tags:
id   user_id   name
--------------------
 1   1         java         // Bobs tags...
 2   1         java script
 3   1         C#   
 4   2         java         // Alices tags...
 5   3         java         // Eves tags...
 6   3         java script

```

My goal is to extract all users with tags java or java script only, but not users which have java, java script and C# together.

As output of the query I expect to receive following result:

```
Result:
id   username
--------------
2    Alice     
3    Eve 

```

I've tried to use query from [SQL one-to-many relationship - How to SELECT rows depending on multiple to-many properties?](https://stackoverflow.com/questions/51153040/sql-one-to-many-relationship-how-to-select-rows-depending-on-multiple-to-many), but as I noticed it is a bit different idea behind of it

Answer: 
Try this one:

```
const to = moment("2020-06-30T00:00:00");
const toNextDay = moment(to.add(1, 'days').toDate());

```

As moment is modifying the original moment object, either use toString() or toDate() to get the modified date.

```js
const to = moment("2020-06-30T00:00:00");
const toNextDay = moment(to.add(1, 'days').toDate());
console.log('In local time => ', toNextDay.toString());

const toUTC = moment.utc("2020-06-30T00:00:00");
const toNextDayUTC = moment.utc(toUTC.add(1, 'days').toDate());
console.log('In UTC => ', toNextDayUTC.toString());
```

```html
<script src="https://momentjs.com/downloads/moment.min.js"></script>
```
Try the following. `Parse` the string using moment's second argument then use `add()` to add the specified number of days

```js
var input = "2020-06-30T00:00:00";
let addDay = moment(input, "YYYY-MM-DD hh:mm:ss").add(1, "days");
console.log(addDay.format("YYYY-MM-DDTHH:mm:ss"));
```

```html
<script src="https://momentjs.com/downloads/moment.js"></script>
```