Search results

  1. R

    Help with elapsed time function in form

    Hi - The following will return elapsed time in weeks, days, hours, minutes, seconds as specified by the operator. It shouldn't be difficult to modify the display to meet your needs. Public Function DtDiff(sdate As Date, edate As Date, Optional pItems As String = "wdhns") As String...
  2. R

    converting dates with different formats to numbers

    Hi - What are the precise current formats for your two columns? When you say 'obtain numbers instead of dates', what precisely are you attempting to see? Please post examples. Bob
  3. R

    Need list of forms, queries, etc.

    Hi - The following sub (it's lengthy, I know) will create tblObjects and populate it with information about your tables, queries, forms and reports. Copy it to a standard module. Ensure that the module name is not the same as the sub. From the debug window: Call CaptureObjects <enter>...
  4. R

    Filter dates in table that fall on a Saturday

    Hi - Welcome to the forum. In a query of your table, add a calculated field, e.g.: Expr1: Weekday([YourDateField]) , then in that field's criteria cell place 7. That will return only records where the date fell on a Saturday. HTH - Bob
  5. R

    DateDiff() to only show weekdays?

    Hi - Give this a try: Function DateDiffExclude2(pstartdte As Date, _ penddte As Date, _ pexclude As String) As Integer '********************************************* 'Purpose: Return number of days between two ' dates, excluding...
  6. R

    Julian Date

    Personally, I have never understood the desire to use the 'julian date', particularly with all the date-related functions available in Access. Having said that, the use of 1 to indicate the 21st century is surely not self-explanatory. Could I suggest, as an alternative: ? val(year(date()) &...
  7. R

    Julian Date

    Hi - The 09 and 363 are obvious, but what does the 1 indicate? Bob
  8. R

    Julian Date

    Hi - I'm curious as to your definition of 'julian date'. If you did a Google on the term, you'd find it represented as a 7,980-year cycle that began on January 1, 4713 BC'. However, most times when a reference is made to it nowadays, e.g. military usage, it refers to some version of the day...
  9. R

    Clear Immediate window

    Hi - Give this a try: Public Sub MeGo() 'purpose: Erase contents of debug (immediate) window 'coded by: raskew 'inputs: from debug window: mego <enter> Dim strErase As String strErase = String(256, Chr(13) + Chr(10)) Debug.Print strErase End Sub HTH - Bob
  10. R

    Syntax Error

    Hi - I'd be curious if a version of: strSql = strSQL & " " & "Where Instr(""could not be delivered,not able to deliver,not been delivered,permanent error,failed,Will not retry, not recognized,unrecoverable error,undeliverable,no user by that,I have now left,incorrectly addressed,Sorry it...
  11. R

    Question Difference + Time + Date + Format

    Hi again - Paste the code into a standard module, ensuring that the module name is not the same as the function name. You can then call it from any code. Bob
  12. R

    Question Difference + Time + Date + Format

    Hi - Welcome to the forum. Take a look at http://www.access-programmers.co.uk/forums/showthread.php?t=183059 for a similar problem. Here's an adaptation of that, hopefully returning hh:nn:ss. Note that I've used US date/time format, i.e. mm/dd/yyyy vs. dd/mm/yyyy. Public Function...
  13. R

    Question Birthday Reminder Query

    Hi - Here's an example based on Northwind's Employees table. 1) Public Function Anniversary Public Function Anniversary(ByVal pDate As Date, _ Optional pNextOne As Boolean = False) As Date '******************************************* 'Purpose: Return this years'...
  14. R

    Date must be 7th or 21st of month (date formatting)

    Hi - See if any of the logic in this query (based on Northwind's Orders table) would be of assistance: SELECT DISTINCT Orders.* FROM Orders WHERE (((InStr(["7,21"],Val(Day([OrderDate]))))>0) AND ((Day([OrderDate])) In (7,21))); Bob
  15. R

    How to report on inclusive dates

    Hi again - You might want to play around with this as an alternative ending date/time: ? dateadd("s", -1, dateserial(year(date()), month(date())+1, 1)) 12/31/2009 11:59:59 PM Bob
  16. R

    A query that shows records from now until the end of the month...

    Hi - try Between Date() and DateSerial(year(date()), month(date()) + 1, 0) in your date field's criteria. HTH - Bob
  17. R

    DateDif - Calculating Days and Hours

    Hi - Give this a try: Public Function ddhhnn_diff(dtein As Date, dteout As Date) As String 're: http://www.access-programmers.co.uk/forums/showthread.php?t=183059 '******************************************* 'Purpose: Returns DateDiff as dd:hh:nn 'Coded by: raskew 'Input: From debug...
  18. R

    sql query help

    Hi - Try this: SELECT * FROM tblBoxType WHERE [Contract ID] Is Null; HTH - Bob
  19. R

    make table query?

    Hi - It'd be a little easier to evaluate if you'd post your code. Best wishes - Bob
  20. R

    Workdays between two dates

    Hi - Give this a try: Public Function fGetWorkdays2(pstart As Date, pend As Date) As Integer '************************************************ 'Purpose: Compute number of workdays (Mon - Fri) ' between pStart and pEnd 're...
Back
Top Bottom