Operation for Date

This is a discussion on "Operation for Date" within the Classic ASP section. This forum, and the thread "Operation for Date are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 16th, 2003, 17:33
New Member
Join Date: Sep 2003
Location: Singapore
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to siaoa84
Operation for Date

Hi , i have some pro finding the difference between dates to know the daysCan help me , thanks???

i get these information from a form

strdate=(request.form("startdate"))
enddate=(request.form("startdate"))

enddate-strdate= ? ? ? ?? ?

Thanks

  #2 (permalink)  
Old Oct 16th, 2003, 18:54
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
DateDiff(d,strdate,enddate)

I use this page http://www.w3schools.com/vbscript/func_datediff.asp a lot.

Also, did you notice that you are pulling the field "startdate" for both dates?

jakyra
  #3 (permalink)  
Old Oct 17th, 2003, 03:03
New Member
Join Date: Sep 2003
Location: Singapore
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to siaoa84
ic....but i thought request.form("startdate") return a string instead of date ?? so how do i convert a string to a date ??
  #4 (permalink)  
Old Oct 17th, 2003, 10:10
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
use isdate() to check that the string can be converted and then use cdate() to convert to a date.

Should do what you are after

u2o
Closed Thread

Tags
operation, date

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple-step operation generated errors Andrew1986 Databases 2 Mar 14th, 2008 07:29
I need to know about Gradient fill operation balaakrs Flash & Multimedia Forum 1 Oct 1st, 2007 21:38
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 17:16
Date in Asp Gup Classic ASP 1 Jun 5th, 2006 09:05
asp date Monie Classic ASP 1 Sep 21st, 2004 04:38


All times are GMT. The time now is 06:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43