Getting a date difference between a certain date and current date

Hello!

If I have a String in the following format: 27.04.2004 12:10:05

How do I get the day difference between this String value and a current date?
agajewskiAsked:
Who is Participating?
 
[ fanpages ]IT Services ConsultantCommented:
Hi agajewski,

Isn't this the third time this has been posted?

  Dim strDate As String
 
  strDate = "26.07.2004 12:10:05"
 
  MsgBox DateDiff("d", CDate(Replace(strDate, ".", "/")), Now())


BFN,

fp.
0
 
agajewskiAuthor Commented:
There were some problems in the server and it never showed me the issue was logged. Sorry for that, but your answer was perfect! Thanks!
0
 
[ fanpages ]IT Services ConsultantCommented:
No problem.

Happy codin',

BFN,

fp.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.