Print Page | Close Window

How can i get the different date?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=3113
Printed Date: 01 April 2026 at 9:29am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How can i get the different date?
Posted By: Cool_Man
Subject: How can i get the different date?
Date Posted: 29 May 2003 at 8:45am

Hi all,

could someone tell me how can i get days between different date ?

in SQL code, i should write this code:

SELECT DateDiff(day, '07/14/1974', GETDATE())

it's will give me this result:

-----------
10546

but when i use it im web page it's give error !

i'm using access database in my forum.

if you learn me how it's could be , i will create new MOD , it's very nice, it's will give you the best members who had higher post in a day.

plzz help me



-------------


Thanks for all



Replies:
Posted By: Scotty32
Date Posted: 29 May 2003 at 9:31am

am not sure wot your tryna do, but i kinda asked the same think (maybe)

and i think its...

SELECT * FROM tblName WHERE DBField BETWEEN " & strDate1 & " AND " & strDate2 & " ORDER BY....

hope it helps

(BTW this is for Access)



Posted By: michael
Date Posted: 29 May 2003 at 10:21am
In Access you would have to do something like
SELECT DateDiff('d','1-1-2003',Now()) AS diff_d
You can do the same in ASP itself like
Datediff("d", dteDate, now())

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Cool_Man
Date Posted: 29 May 2003 at 11:34am

thank you Scotty_32,

thank you michael,

i had do it, and it's doesnt work, it's give me error.

but i do it now, and it's work good

it's very sample code

that is:

(NOW - tblAuthor.Join_date) AS diff_date

it's will give you : how many days between NOW and (Join_date) for the member

thanks for trying to help me lool



-------------


Thanks for all



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net