Avatar of nkoriginal
nkoriginal
Flag for Spain

asked on 

DateTime.Now 3 hours early

Hello Folks I need to do a basic function in vb.net  and I dont know how to implement in datetime.

I've this variable:  Dim GetValue as string = DateTime.Now
and in my DB  I've this value: 09/08/2010 12:32:49

What I need to do:

For example Today is 09/09/2010 03:35:02
I need to create a function to get the this value: 09/08/2010 02:00:00

Why I need that:
Because I need to delete all entries in my dabaset with a entry date by yesterday + 2 hours.

Thanks
Visual Basic.NET.NET ProgrammingMicrosoft SQL Server

Avatar of undefined
Last Comment
Mohit Vijay

8/22/2022 - Mon