# Set hour in a variable type Date

**URL:** <https://forum.camunda.io/t/set-hour-in-a-variable-type-date/23059>\
**Category:** Discussion & Questions\
**Created:** [October 8, 2020, 11:03am UTC](https://forum.camunda.io/t/set-hour-in-a-variable-type-date/23059 "2020-10-08T11:03:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [October 9, 2020, 5:09am UTC](https://forum.camunda.io/t/set-hour-in-a-variable-type-date/23059/2 "2020-10-09T05:09:12Z")

</div>

@glonico refer this example:

> [@How to add days to a date variable in a service task](https://forum.camunda.io/t/how-to-add-days-to-a-date-variable-in-a-service-task/22488/2):
>
> @solo812 try expression like this below: ${dateTime().withMillis(dueDateField.getTime()).plusDays(10).toDate()} Deploy this bpmn and test: [DateCalculationProcess.bpmn](https://forum.camunda.io/uploads/short-url/u7MfvVxRpflhHsEPZobWEQHLbxu.bpmn) (2.9 KB)

you can use expression like below:

```auto
${dateTime().withMillis(sendDate.getTime()).plusHours(4).toDate()}

```

You can find more **date related functions** here:

[http://joda-time.sourceforge.net/api-release/org/joda/time/DateTime.html](http://joda-time.sourceforge.net/api-release/org/joda/time/DateTime.html)

---

_[View the full topic](https://forum.camunda.io/t/set-hour-in-a-variable-type-date/23059)._
