Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How can i get the different date?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can i get the different date?

 Post Reply Post Reply
Author
Cool_Man View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 March 2003
Location: Kuwait
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cool_Man Quote  Post ReplyReply Direct Link To This Post Topic: How can i get the different 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
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post 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)



Edited by Scotty_32
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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())
Back to Top
Cool_Man View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 March 2003
Location: Kuwait
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cool_Man Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.