473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Time In and oUt... (time OUT- Time IN) HElP

1
Hi!
i just want to ask how to manipulate Time and Date... suppose I have
tiMe in 1:30pm. and TIme OUt 2:15... and i want to get the tiMe between 2:15 and 1:30..

SUppose i have Date 1 = Sept 16, 2007 and Date 2 = maRch 12, 2008 and i want to get the number of days between those dateS..
what Codes Should I Use?? i need it this week because it's part of our CAseStudy in Our School! thanKs!
Oct 2 '07 #1
2 1357
Ali Rizwan
925 512MB
Hi!
i just want to ask how to manipulate Time and Date... suppose I have
tiMe in 1:30pm. and TIme OUt 2:15... and i want to get the tiMe between 2:15 and 1:30..

SUppose i have Date 1 = Sept 16, 2007 and Date 2 = maRch 12, 2008 and i want to get the number of days between those dateS..
what Codes Should I Use?? i need it this week because it's part of our CAseStudy in Our School! thanKs!
I dont know any short formula but i have made a sample for you it calculate the days between two dates. And time between two times.
Attached Files
File Type: zip DT.zip (2.0 KB, 103 views)
Oct 2 '07 #2
Ali Rizwan
925 512MB
Hi!
i just want to ask how to manipulate Time and Date... suppose I have
tiMe in 1:30pm. and TIme OUt 2:15... and i want to get the tiMe between 2:15 and 1:30..

SUppose i have Date 1 = Sept 16, 2007 and Date 2 = maRch 12, 2008 and i want to get the number of days between those dateS..
what Codes Should I Use?? i need it this week because it's part of our CAseStudy in Our School! thanKs!
Hey
I have remember another function try these too these are easy
******************************
DateADD()
Date addfunction is used to add or subtract from a date. It has three parameters.
1) Part of date to be added or subtracted
2) Amount to be added or subtracted
3) Only valid date to be processed

D="01/22/2003"
print dateadd("yyyy",5,D)
it add 5 years

yyyy Add or subtract years
m Add or subtract months
d Add or subtract days
h Add or subtract hours
n Add or subtract minutes
s Add or subtract seconds

*********************
DateDiff()
It is used to find the differeence between two dates.
It has also three parameters.
1) Indicates the format for displaying the diff
2) Second and third are only valid dates on which the process will be applied

D1="01/22/2003"
D2="01/22/2004"
print datediff("yyyy",D1,D2)
it will show 365
********************************
Oct 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: peterbe | last post by:
What's the difference between time.clock() and time.time() (and please don't say clock() is the CPU clock and time() is the actual time because that doesn't help me at all :) I'm trying to...
3
by: Shawn Yates | last post by:
I have a database that I am using as a Time clock where employees can clock in and out. Is there a way to make it so that when they clock out a form would open displaying their work day hour by...
3
by: hygeena | last post by:
Hi, I m working with access.we hav a table history stores the employee IN/OUT time details...The IN/OUT time details s stored in the same field as event time....I want to get the...
6
by: remya1000 | last post by:
i'm using Vb.net. i need to find out the remote machine's time by using NET TIME. NET TIME i got this help from internet while searching. but while using this code i'm not able to display...
2
by: sunfeifei | last post by:
Write a program that allows a user to input two numbers (the first between 1 and 12, the second between 0 and 59 inclusive) and then prints out the time they represent, in words. You should follow...
1
by: jonny | last post by:
Option Explicit Private mdTarget1 As Date Private mdTarget2 As Date ' called on form load Public Sub SetRecordStartTime() mdTarget1 = DateAdd("n", 60, Time) mdTarget2 = DateAdd("n", 120,...
17
by: Andrew Chalk | last post by:
Network time uses 1900 as its base. The C time library uses 1970. I want to convert a network time value to a C library time. I.e. I have to subtract the number of seconds from 1900 to 1970. Is...
17
by: Karthigan Srinivasan | last post by:
Is there an equivant method of 'time ./a.out' in Windows to measure execution time for a program? Best Regards, Karthigan.
0
by: Eric Wertman | last post by:
I tend to deal with dates a lot in different formats and places... typically I'll convert them to a time tuple with strptime(), and pass them around like that before I need to write them back out....
0
by: Eric Wertman | last post by:
Sorry, my time zone is +4, not minus 4, which means that something else is causing my source data to be in the future. I still do need to understand where the time routines determine the time zone...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.