• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

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?
0
agajewski
Asked:
agajewski
  • 2
1 Solution
 
[ 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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now