# Date difference using VB.Net function

**URL:** <https://forum.uipath.com/t/date-difference-using-vb-net-function/113995>\
**Category:** Help\
**Tags:** system, activities\
**Created:** [May 3, 2019, 4:45am UTC](https://forum.uipath.com/t/date-difference-using-vb-net-function/113995 "2019-05-03T04:45:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaheshShelke](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@MaheshShelke](https://forum.uipath.com/u/MaheshShelke)\
**Post date:** [May 3, 2019, 4:45am UTC](https://forum.uipath.com/t/date-difference-using-vb-net-function/113995/1 "2019-05-03T04:45:29Z")

</div>

How to check date difference using [VB.Net](http://VB.Net) function between current date and past date

---

<div class="post-metadata">

**Author:** ![c.ciprian](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/c.ciprian/32/22136_2.png) [@c.ciprian](https://forum.uipath.com/u/c.ciprian)\
**Post date:** [May 3, 2019, 4:47am UTC](https://forum.uipath.com/t/date-difference-using-vb-net-function/113995/2 "2019-05-03T04:47:28Z")

</div>

For [VB.NET](http://VB.NET) try searching [Google](https://google.com) before. It has a lot of examples

> **[DateAndTime.DateDiff Method (Microsoft.VisualBasic)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.dateandtime.datediff?view=netframework-4.8)**
>
> Returns a value specifying the number of time intervals between two Date values.

---

<div class="post-metadata">

**Author:** ![sandeep13](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sandeep13/32/79017_2.png) [@sandeep13](https://forum.uipath.com/u/sandeep13)\
**Post date:** [May 3, 2019, 4:47am UTC](https://forum.uipath.com/t/date-difference-using-vb-net-function/113995/3 "2019-05-03T04:47:41Z")

</div>

hello @MaheshShelke  
you can use Datediff function .

---

<div class="post-metadata">

**Author:** ![balu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/balu/32/177693_2.png) [@balu](https://forum.uipath.com/u/balu)\
**Post date:** [May 3, 2019, 6:13am UTC](https://forum.uipath.com/t/date-difference-using-vb-net-function/113995/4 "2019-05-03T06:13:16Z")

</div>

HI @MaheshShelke

follow as below

> [@Get difference between two dates?](https://forum.uipath.com/t/get-difference-between-two-dates/3965):
>
> I have two dates (using Now), wherein I want to get difference between them? How can I achieve that? What would be the variable to save Now ???

Thanks
