473,473 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with dates

2 New Member
Hello fellas,

Am really new at asp, but am learning as fast as I can, but now am with a challenge and don't know how to do this....

I need to build an asp-based report, there is a databace SQL based, where all the door using is registered with the credential, who has an employee name.

The challenge is that some people uses the main door several times at day, then all those movements are logged into the SQL DB, so HHRR only needs to know the first time that you used (Day and time of your assistance) and the last time (when you leaved the building)

I know how to connect to the DB, and get the info, but i have no ideas of how to obtain that info, for each day and only show:

Employee Name: XXXXXX

Monday 11/03/2008 8:30 am 11/03/2008 6:30 pm
Thursday 12/03/2008 8:00 am ETC.....


About the format I can do it by my self, but how to obtain only the first and the last date???
Mar 11 '08 #1
2 1149
jeffstl
432 Recognized Expert Contributor
Hello fellas,

Am really new at asp, but am learning as fast as I can, but now am with a challenge and don't know how to do this....

I need to build an asp-based report, there is a databace SQL based, where all the door using is registered with the credential, who has an employee name.

The challenge is that some people uses the main door several times at day, then all those movements are logged into the SQL DB, so HHRR only needs to know the first time that you used (Day and time of your assistance) and the last time (when you leaved the building)

I know how to connect to the DB, and get the info, but i have no ideas of how to obtain that info, for each day and only show:

Employee Name: XXXXXX

Monday 11/03/2008 8:30 am 11/03/2008 6:30 pm
Thursday 12/03/2008 8:00 am ETC.....


About the format I can do it by my self, but how to obtain only the first and the last date???
Before I give this a shot can I ask how familiar are you with SQL? Or atleast the program you use to build querys into the database?

Im not exactly sure if this answers your question because I'm not familiar with your specific database. However, there is a way to get the earliest record and latest record of the day IF you are using autonumbers or some kind of ascending number system for each unique key of a time stamp record.

If you ARE doing that then there is SQL that you can use to get the MAX and MIN value of that key for the record, (in other words the actual order the records were written in) and those will be your 2 records you need for the 2 time stamp values.
'This would get the last stamp of the day
SELECT MAX(column) FROM table

You might even be able to do this strictly with your date\time columns though again, Im not sure how they are formatted, if they are seperate columns, etc.

Your best bet would be the primary key if possible.
Mar 11 '08 #2
baruch
2 New Member
Thank you for posting...


This is the format of the dates

dd/mm/aaaa hh:mm AM/PM

and is helpfull with the actual reports (mean while I understand the DB), and if there is some organization or specific secuencial number or ID each day..

THANK YOU SO MUCH :D

As a teacher told me at school "For greatest problems, easiest solutions" :D
Mar 11 '08 #3

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

Similar topics

1
by: StinkFinger | last post by:
All, Struggling with a query here. table name : holidays fields : holname (format varchar) holdate (format date 2004-01-01) The table is populated with all the holidays for the next 5 years....
2
by: Adrian Parker | last post by:
I have a server app which is sent a date in the local format of the client machine. I've no control over the client app at all, so have to code at the server end to cope with any problems. The...
5
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql,...
3
by: B | last post by:
Hi I would like to create a SP where it will populate TableA based from TableB. TableB will be populated on a monthly basis using a DTS and within that I would like to run the SP to populate...
2
by: Ian DeRock | last post by:
I'm fairly new to XML. As I can see it, XML is a way to organize data like in a table in a RDB, or the RDB itself. I have used XML in application data, but did not design the actual XML. I...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
0
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers......
12
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is...
4
by: Steve Chow | last post by:
I was wondering if someone could help with my assignment. I've pretty done finished the work but cannot figure out why it only prints the last one added. Here is my code. The way things are done...
0
by: dco | last post by:
I am trying to create a crystal report that would show the difference between a field on two different dates. In SQL I have a table that takes a snapshot of a meter the same time everyday. I want...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.