Solved

Getting a date difference between a certain date and current date

Posted on 2004-04-27
3
577 Views
Last Modified: 2010-05-02
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
Comment
Question by:agajewski
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 125 total points
ID: 10925998
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
 

Author Comment

by:agajewski
ID: 10926327
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
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10926337
No problem.

Happy codin',

BFN,

fp.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now