Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2003, 09:29 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default datediff function

i haf dis problem of displaying the date difference. i noe tad the datediff function is to find the difference between two dates using dis format.

datediff("d",submit,close)
submit is start date.
close is end date.

but den my format of the dates is 25-Jun-03. & the system cant find the diff using dis format. so can anyone help me by givin me solution as to how to resolve dis problem of mine wifout me changing the format of my date. which means i wan to find the diff using dis format- 25-Jun-03

thanz...
 
Old July 26th, 2003, 12:38 PM
Authorized User
 
Join Date: Jun 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to vinyl-junkie
Default

Without reformatting your dates to mm/dd/yy format, you cannot get datediff to work.

Pat Wong
http://www.napathon.net/ - Music Around The World
For collecting tips, trade and want lists, album reviews and more.
 
Old July 26th, 2003, 10:18 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You might want to try:

DateDiff("d", CDate(submit), CDate(close))

This is assuming that submit and close are something that can
be interpreted as a date literal.







Similar Threads
Thread Thread Starter Forum Replies Last Post
DateDiff zahyea .NET Framework 1.x 0 October 16th, 2007 04:38 AM
datediff ebburks Access 2 July 28th, 2006 06:58 PM
How to use the datediff function to compare dates cesemj VB How-To 0 June 9th, 2006 04:03 PM
help with DateDiff isaac2004 Classic ASP Basics 9 January 16th, 2006 02:34 AM
Using DateDiff iancrabtree Access 2 November 27th, 2005 07:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.