 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
cloudy

Joined: 21 May 2007 Posts: 7
|
Posted: Wed May 23, 2007 4:40 pm total days calculation |
|
|
|
hi, i m new in this forum, i hope can get some help on my problems.
i have 3 field like:
start date,end date and total days.
i not sure which way is good to get the total days?i need to get the total days from the user entered the value or i calculate my total day at the backend?count the datediff between the start and end date?
if the user wan to apply half day leave, hw it work?how the start date and end date can count the half day.?is it possible?
reallyblur on it.
hope to get from u all soon.urgent...
plz help ya.
thank you.  |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri May 25, 2007 4:04 am |
|
|
|
You can use the DateDiff and DateAdd functions
| Code: |
<%
sd = "21/05/2007 9:00 AM"
ed = "26/05/2007 4:30 PM"
d = DateDiff("d",sd,ed)
Response.Write "Days: " & d & "<br>"
sd = DateAdd("d",d,sd)
h = DateDiff("h",sd,ed)
Response.Write "Hours: " & h & "<br>"
sd = DateAdd("h",h,sd)
m = DateDiff("n",sd,ed)
Response.Write "Minutes: " & m
%>
|
|
|
cloudy

Joined: 21 May 2007 Posts: 7
|
Posted: Sun May 27, 2007 4:21 pm calendar-days calculation |
|
|
|
hi there,
i jz get the date from the calendar. didnt get the time.how can i get the time and cont with the process?
thank you. |
|
cloudy

Joined: 21 May 2007 Posts: 7
|
Posted: Thu May 31, 2007 8:57 pm |
|
|
|
hi there,
thanx for ur kind response.i have solve it eoldi..
thank you very much. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|