How get earliest timestamp?

I have a table with a date/time column.
I need to retrieve the earliest timestamp record.
I'm currently using SELECT MIN(timestamp), is this correct?

Thanks.
-1
Utf
3/20/2008 8:42:01 PM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
812 Views

Similar Articles

[PageSpeed] 28

Yes.
But, are you filtering the query so it returns only one record?
If not, then you would need SELECT TOP 1 MIN(timestamp)
But then, I am thinking if you want to return only one value, why not use a 
DMin function instead?

-- 
Dave Hargis, Microsoft Access MVP


"mscertified" wrote:

> I have a table with a date/time column.
> I need to retrieve the earliest timestamp record.
> I'm currently using SELECT MIN(timestamp), is this correct?
> 
> Thanks.
0
Utf
3/20/2008 8:47:01 PM
Good point. I had ignored the possibility of duplicate timestamps, but I 
suppose it could happen!

"Klatuu" wrote:

> Yes.
> But, are you filtering the query so it returns only one record?
> If not, then you would need SELECT TOP 1 MIN(timestamp)
> But then, I am thinking if you want to return only one value, why not use a 
> DMin function instead?
> 
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "mscertified" wrote:
> 
> > I have a table with a date/time column.
> > I need to retrieve the earliest timestamp record.
> > I'm currently using SELECT MIN(timestamp), is this correct?
> > 
> > Thanks.
0
Utf
3/20/2008 11:21:02 PM
Not an issue. If your query is ONLY referencing aggregate functions, then 
only a single row will be returned. Even if there are duplicate data values, 
there's still only a single value for the min().

"mscertified" <rupert@tigerlily.com> wrote in message 
news:7255599E-2600-4646-973A-12168233AD8F@microsoft.com...
> Good point. I had ignored the possibility of duplicate timestamps, but I
> suppose it could happen!
>
> "Klatuu" wrote:
>
>> Yes.
>> But, are you filtering the query so it returns only one record?
>> If not, then you would need SELECT TOP 1 MIN(timestamp)
>> But then, I am thinking if you want to return only one value, why not use 
>> a
>> DMin function instead?
>>
>> -- 
>> Dave Hargis, Microsoft Access MVP
>>
>>
>> "mscertified" wrote:
>>
>> > I have a table with a date/time column.
>> > I need to retrieve the earliest timestamp record.
>> > I'm currently using SELECT MIN(timestamp), is this correct? 

0
Paul
3/21/2008 8:17:56 PM
Reply:

Similar Artilces:

Macro to get rid of "Chart1" Verbiage
Excel 2000 ... I got this Macro from this board before ... Debra D (I think?) ... I wish to get rid of "Chart?" from the header of my Charts. Anyone ... How do I do this? ... Thanks ... Kha If you're trying to clear the header on a chart sheet, choose View>Header and Footer, then from the Header drop-down list choose None. If it's something else, perhaps you can give a bit more detail. Ken wrote: > Excel 2000 ... I got this Macro from this board before ... > Debra D (I think?) ... I wish to get rid of "Chart?" from > the header of my Charts. &g...

Getting Rid of "Ghost Field" on Access Report
Hello All, I'm hoping you can help me with a puzzling behavior exhibited by an Access report. When I attempt to run it I receive an error message asking for a value to a field that is not on the report or the underlying query. I have a report, which I will refer to as MyReport#1. It runs off of a MyQuery#1 without any error messages. I used MyReport#1 as the basis for a second repot, which I will call My Report#2. Everything, in MyReport#2 is identical as MyReport#1 except for one field. MyReport#2 runs off of a different query which I will call MyQuery#2. If I run MyQuery#2 by...

Getting header width during HDN_ENDTRACK
How would I go about getting total width of a CHeaderCtrl within code that is run in response to HDN_ENDTRACK? Right now I sum widths of all header item rects to get the total width, but it seems that at the time HDN_ENDTRACK is handled GetItemRect() returns the previous column rectangles (before the change) - not the new ones. I need to do this in HDN_ENDTRACK to update scrollbars properly in response to header column width changes. ...

How can I get Positive values only from the random number generat.
I am generating a random group of numbers using Excel's add-in "Random Number Generator". I am using the normal distribution, but I want positive values only. I know that the test I am doing will work with the negative values I have generated, because the mean/stdev are correct. However, the activity for which the numbers are associated can never be negative, so my presentation will be less effective. Any ideas? You could use the randbetween function and specify a positive range i.e. =Randbetween(1,10000000) HTH Jimbola "Markw3700" wrote: > I am gene...

Trying to get online
When I try to activate CRM back online I'm asked the question: Are you sure you want to go back onlinea? I hit Yes, and then get the following error message: An unknown error has occured. Retry the action. If the problem persists, contact your system administrator. But he has no problem accessing the web version. Running WinXP, Office 2003. I am relatively new to this in terms of supporting...we had a third party install it and he left. I apologize if my question is vague. Could you please just let me know some possible reasons why this might happen or what to look at in orde...

How can I get a unique list of a column?
I have a column which is the name of cities. There are about 5 cities which is repeated in 50 records (rows). I want to get the name of this 5 cities in a separate column. How can I do this? TIA Rasoul Khoshravan Use Data>Filter>Advanced Filter. There is an option to filter unique records. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Yabi" <khoshravan@gmail.com> wrote in message news:1176190587.423150.254060@q75g2000hsh.googlegroups.com... >I have a column which is the name of cities. There are about 5 cities >...

How do you get option quotes in MS Money with new symbols
Does anyone know how to get the new symbol option quotes into the Portfolio Manager within MS Money? The symbol format changed on 1/25/2010 from the old format (ex.. Dell february 13 put was .dlyno) which is no longer valid. Go out to MSN Money and loop up the Options chain: http://moneycentral.msn.com/investor/options/default.asp?Symbol=DELL Don't know whether or not those new symbols will work within Money though? -Mark "Paul" <Paul@discussions.microsoft.com> wrote in message news:9F25DEBF-B785-44FE-96D6-75477C8B2164@microsoft.com... > Does anyone ...

Get DTS datapump source columns
Hello, Using VB.NET 2008 Express edition. Added a reference to DTS Package Object Library (DTS.dll) I am having no trouble looping through tasks and steps. However, when I come across datapumps, I have a need to get the source column names, but cannot figure out how to access them. They do not appear to be included in the Task.Properties collection. Can anyone help me out?? Thanks, Mark I'd move back to vb6, buddy seriously, sorry.. I miss DTS / Vb6.. It blows my mind that we can't save a SSIS package as a VB.net script. On May 20, 8:24=A0am, Mark <...

Getting email into address book
I know the addresses are saved as when I start a name it appears, but I have 3-400 email addresses. When a message comes in I categorize it, but How to I get them into the address Book...automatically. On 10/18/03 02:45 PM, in article BBB702A6.36E%loey@loeyart.com, "loey@loeyart.com" <loey@loeyart.com> wrote: > I know the addresses are saved as when I start a name it appears, The is the most recently used. More info on MRU: <http://www.entourage.mvps.org/faq/faqs.html#anchor-10> >but I have > 3-400 email addresses. When a message comes in I categorize it, b...

Simple hack to get $500 to your home. 06-30-10
Simple hack to get $500 to your home at http://uptadesonly.co.cc Due to high security risks,i have hidden the cheque link in an image. in that website on left side Above search box, click on image and enter your name and address where you want to receive your cheque. please don't tell to anyone. ...

How to get SOP-GL distributions.
Hello GP Community, I've been tasked with creating a report that shows a posted invoice and all of the lines (from the SOP30300) table, but then I also need to show the GL distributions for each invoice line item. This would be fine if each line item had only one GL line in GL30000, but that's not always the case. It appears that a line in SOP30300 can have one or more lines in the GL30000 table (in my case one line item has 4 different GL distributions). The GL30000 table has a field called ORDOCNUM which allows me to link based on the document number, but I would also need the SO...

Get event of "TrackPopupMenu"
After I pop up a TrackPopupMenu, how do I know it disappear? Kevin Tang wrote: >After I pop up a TrackPopupMenu, how do I know it disappear? TrackPopupMenu is synchronous, so when the function returns, the menu has disappeared. -- Doug Harrison Microsoft MVP - Visual C++ ...

Delayed Delivery
In 2002 I could forward a drafted message with a delay of so many days. It would actually SEND the composed mail to the server which would hold it until the specified date/time of delivery. No worries left for me, I could shut down my pc and leave and it would still get delivered I updated to 2003 (required at work) and tried to do this and it keeps saving the mail in my outbox without sending it to the server... THIS IS BAD. I know you say I should leave my PC on, but I'm not supposed to, but I still need that message delivered at exactly that time... How can I fix this and force it to s...

Getting attribute value from xml using xpath to get file path
I have the following xml file: <?xml version="1.0" encoding="utf-8" ?> <course id="2555" title="Developing Microsoft .NET Applications for Windows (Visual C# .NET)" length="5 days" source="http://www.microsoft.com/learning/syllabi/en-us/2555Afinal.mspx"> <module id="1" title="Introducing Windows Forms" location="D:\Disk-C\Documents and Settings\orit_itzhar.ATRICA\My Documents\XML\csharp"> <lesson id="1.1"> <subject>Creating a Form</subject> <f...

Email disappears from outbox but does not get sent
Went I send an email from outlook, it disappears from the outbox as if it was sent, but it does not actually get sent. It is going via SMTP server and I triple checked, and the settings are right. I do not get any outlook errors, the emails just dont actually get sent. Thanks Perhaps an interfering Anti-virus scanning add-in? If so, try disable, if still interfering, reinstall the A-V software with out that feature. skulmat wrote: > Went I send an email from outlook, it disappears from the outbox as if it was > sent, but it does not actually get sent. > >...

Getting a useful Auto Scale
I have a chart showing number of calls per employee as a column graph and duration of calls as a line graph together. The scale is automatic. The scale for the number of calls works great. The scale for the duration works, but it doesn't use nice numbers. For example, if my employee with the longest duration is currently at 01:55:43 (hh:mm:ss), the top of the scale shows 02:09:36. I want to keep it on automatic, but I want it to use nicer numbers, like 02:00:00 or 02:15:00 instead of 02:09:36. Is there any easy way to do this? If not, is there any way to do this? Thanks, sb1920alk...

Outlook 2003
Hello All, I have a strange problem. The timestamp Outlook puts on all my sent/incoming etc emails have an hour earlier than my system time. For example, if my system time is 1:36PM and I send my self an email, it shows it was sent at 12:36PM and received also at 12:36PM. Does anyone know what may be causing this and how to correct it? Thanks :) I fixed it... I checked my Date Time settings in Control Panel and it was set for the correct time (Central Time). However, the "Automatically adjust clock for daylight saving changes" was not checked. So, I checked it and sent myse...

Getting the size of a menu
Hi all, I've been looking for this on the newsgroups and on various sites, but haven't found an answer (a lot of similar questions though). I want to get the width of a menu before showing it. This is what I tried: CSize GetMenuSize(HWND parentWnd, HMENU hMenu) { ASSERT(hMenu != NULL); int nItemCount = ::GetMenuItemCount(hMenu); int nWidth = 0, nHeight = 0; for (int i=0; i<nItemCount; i++) { CRect rect; ::GetMenuItemRect(parentWnd, hMenu, i, &rect); nHeight += rect.Height(); nWidth = max(nWidth, rect.Width()); } return CSize(nWidth, nHeight); } This actually ...

Getting attachements I can not open
I have outlook 6.0 and it seems as though I can not get an attachement. How can I fix this? Thanks, Hi, John - See http://support.microsoft.com/default.aspx?scid=KB;en-us;q291387 Also note: This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program, despite its similar name.. You will probably get a faster and more expert answer if you post this to an Outlook Express news group. Try posting in one of these newsgroups: microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x microsoft.publ...

Getting this message when i startup excel 2003
Getting this message when i startup Excel 2003, C:\Program Files\Adobe\Acrobat 5.0\pdfmakerA.xla could not be found, i have Acrobat 6 on my computer, i have tried the repair and it still comes up, i have unistalled from add and remove, then reinstalled office 2003 but it still comes up when i start Excel Go to Tools-->Add-ins, and uncheck it. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "Brian" <Brian@discussions.microsoft.com> wrote in message news:7792B9F9-2A5F-471B-A6B4-8151485F5D5F@microsoft.com... > Getting this message whe...

pls get the help
we can't install softwear hence we are working with user not admin. when matchine shut down and openg with safe mood, can't install to softwear without admin logging. -- ruwan ------------------------------------------------------------------------ ruwan's Profile: http://forums.techarena.in/members/219677.htm View this thread: http://forums.techarena.in/windows-xp-support/1336643.htm http://forums.techarena.in Bummer. "ruwan" <ruwan.4aw45b@DoNotSpam.com> wrote in message news:ruwan.4aw45b@DoNotSpam.com... : : we can't install softwe...

why does my file name get suffixed with a number when opening ?
Sometimes when opening a file, especially from an email message, the file name is chnaged and is suffixed with a number in brackets. I thought it could be to do with having multiple files of the same name open but this is not the case, even if this is the opnly file open at the time I seem to get the issue. Please advise. When you open an email attachment, the attached file is written to a particular TEMP drive on your drive. The software must be trained to rename a file with a number rather than overwrite an existing file. ...

How do I get the sum of only odd/even numbered cells in a column?
I need help with the formula to sum up only the odd or even numbers in a column. I appreciate any help that you can provide. Thanks, Steve One way, even =SUMPRODUCT(--(MOD(A1:A10,2)=0),A1:A10) odd =SUMPRODUCT(--(MOD(A1:A10,2)=1),A1:A10) -- Regards, Peo Sjoblom "Steve E" <Steve E@discussions.microsoft.com> wrote in message news:0C3FAA07-2E0D-458B-ADFB-9EF27286C60C@microsoft.com... > I need help with the formula to sum up only the odd or even numbers in a > column. I appreciate any help that you can provide. > > Thanks, > Steve =SUM(IF(MOD(A1:A10...

How do I get rid of that large "PAGE 1" thing in Excel?
I'm trying to delete the large "PAGE 1" background text in an Excel spreadsheet. I used the F1 key, and it was useless. You are in page break view, look under view and select normal -- Regards, Peo Sjoblom "shreddaddy" <shreddaddy@discussions.microsoft.com> wrote in message news:856FA9CE-BB49-43CB-BDAC-6C92D30BFEEB@microsoft.com... > I'm trying to delete the large "PAGE 1" background text in an Excel > spreadsheet. > I used the F1 key, and it was useless. Thank you very much. It worked! Nobody else in my office could help me. I...

Getting the information from a Combo Box and show a information
I have a table with 2 fields: server vss Now I need to create a form that show me the vss based on the server selected (a server can have more than one VSS). I added a combo box on Form Header showing the field server. Now I need to create a event (After Update) to show me the VSS relationed to the selected server on Form Detail. I want to show as a spreadsheet. Does anybody know how do I accomplish this task? You are going about this wrong. You need the following tables: TblServer ServerID <<Other fields about Server>> TblVSS VSSID <<Other fields about VSS>>...