Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting a date difference between a certain date and current date

Posted on 2004-04-27
3
Medium Priority
?
588 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

783 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