1ad22 Date Range with Timestamp
Sign Up |  Live StatsLive Stats    Articles 37,467| Comments 178,614| Members 19,494, Newest Kartarsingh| Online 366
Home Contact
 (Forgotten?): 
    10 years of Excellence
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

Date Range with Timestamp

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 0 USD (0%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Date Range Criteria for Crosstab Query Mark Cline Information Technology 6 28-Jul-2006 08:29 AM
User prompt for date range DV Information Technology 3 28-Jul-2006 08:17 AM
Re: Easy Date Range for Report Adnan Information Technology 0 28-Jul-2006 08:13 AM
Date Range on Report POlsen Information Technology 2 28-Jul-2006 08:08 AM
TimeStamp Calculations are wrong. Date Diff Robert Information Technology 1 28-Jul-2006 08:03 AM


Tags
date, range, timestamp
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 08-Nov-2005, 12:52 PM
Mark's Avatar Mark
Guest
 
Posts: n/a
   
   
Date Range with Timestamp

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hi.

I'm using the parametres Between [DateFrom] And [DateTo] for the basis of
business written within a month. Unfortunately, this query excludes the
DateTo (ie. DateFrom = 01-11-05 DateTo = 07-11-05 results in data from
07-11-05 being excluded). Ive tried >= and <= to no avail. The dates are in
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6834-date-range-with-timestamp.html
the Timestamp format of 29-Jun-05 804 AM.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834

Can you please point me in the right direction to make this easier to handle.

Regards,


Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-Nov-2005, 12:52 PM
Tom Wickerath's Avatar Tom Wickerath
Guest
 
Posts: n/a
   
   
RE: Date Range with Timestamp

Hi Mark,

Date/Time values are stored in Access as numbers with decimal values, where
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
the number is the number of days since Dec. 31, 1899 (if I recall correctly)
and the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
Noon, 0.75 = 6:00 PM, etc.).

If your criteria is written like this:

Between [DateFrom] And [DateTo]

You will only pick up records for the DateTo value where the integer portion
is equal to zero (ie. midnight). Try the following instead:

>= [DateFrom] AND < [DateTo] + 1


A DateTo = 07-11-05 would result in all records less than midnight on
07-12-05 being included in the recordset.


Tom

http://www.access.qbuilt.com/html/ex...tributors.html
__________________________________________

"Mark" wrote:

Hi.

I'm using the parametres Between [DateFrom] And [DateTo] for the basis of
business written within a month. Unfortunately, this query excludes the
DateTo (ie. DateFrom = 01-11-05 DateTo = 07-11-05 results in data from
07-11-05 being excluded). Ive tried >= and <= to no avail. The dates are in
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
the Timestamp format of 29-Jun-05 804 AM.

Can you please point me in the right direction to make this easier to handle.

Regards,

Reply With Quote
  #3 (permalink)  
Old 08-Nov-2005, 12:52 PM
KARL DEWEY's Avatar KARL DEWEY
Guest
 
Posts: n/a
   
   
RE: Date Range with Timestamp

An alternative is to strip off the time fraction of your datetime field like --
CVDate(Int([YourDateField]))


"Tom Wickerath" wrote:

> Hi Mark,
>
> Date/Time values are stored in Access as numbers with decimal values, where
> the number is the number of days since Dec. 31, 1899 (if I recall correctly)
> and the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
> Noon, 0.75 = 6:00 PM, etc.).
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
>
> If your criteria is written like this:
>
> Between [DateFrom] And [DateTo]
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
> You will only pick up records for the DateTo value where the integer portion
> is equal to zero (ie. midnight). Try the following instead:
>
> >= [DateFrom] AND < [DateTo] + 1

>
> A DateTo = 07-11-05 would result in all records less than midnight on
> 07-12-05 being included in the recordset.
>
>
> Tom
>
> http://www.access.qbuilt.com/html/ex...tributors.html
> __________________________________________
>
> "Mark" wrote:
>
> Hi.
>
> I'm using the parametres Between [DateFrom] And [DateTo] for the basis of
> business written within a month. Unfortunately, this query excludes the
> DateTo (ie. DateFrom = 01-11-05 DateTo = 07-11-05 results in data from
> 07-11-05 being excluded). Ive tried >= and <= to no avail. The dates are in
> the Timestamp format of 29-Jun-05 804 AM.
>
> Can you please point me in the right direction to make this easier to handle.
>
> Regards,
>

Reply With Quote
  #4 (permalink)  
Old 08-Nov-2005, 12:52 PM
peregenem@jetemail.net's Avatar peregenem@jetemail.net
Guest
 
Posts: n/a
   
   
Re: Date Range with Timestamp


Tom Wickerath wrote:
> Date/Time values are stored in Access as numbers with decimal values, where
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
> the number is the number of days since Dec. 31, 1899 (if I recall correctly)
> and the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
> Noon, 0.75 = 6:00 PM, etc.).


I think you are a little confused. Under the covers, DATETIME values
are stored as Double (FLOAT). The values to the left of the decimal
point correspond to the number of days and the value to the right
represents the time.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834

> >= [DateFrom] AND < [DateTo] + 1


Here another suggestion (untested)

BETWEEN INT(CDATE([DateFrom]))
AND INT(CDATE([DateTo])) + TimeSerial(23, 59, 59)

Reply With Quote
  #5 (permalink)  
Old 08-Nov-2005, 12:53 PM
Tom Wickerath's Avatar Tom Wickerath
Guest
 
Posts: n/a
   
   
Re: Date Range with Timestamp

Peregenem,

> I think you are a little confused.

What do you base your statement on? I stated:

"Date/Time values are stored in Access as numbers with decimal values,..."
without identifying the type of number as you did "Double (Float)".

The only points I'll give you is that I said "where the number is the number
of days since Dec. 31, 1899", when I should have wrote the number to the left
of the decimal is the number of days...

and I included:
"the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
Noon, 0.75 = 6:00 PM, etc.)."

I obviously should have said "the decimal portion corresponds .....".
However, my example clearly indicated that I was using the decimal portions
of a number to represent the time of day. While I may have made some minor
inconsequential mistakes due to the time of day (after midnight when I
posted), I believe any reasonably intelligent person could figure out exactly
what I was stating. I don't think this rises to the level of "I think you are
a little confused". A little tired and sloppy, perhaps, but not confused.

_________________________________________

"peregenem@jetemail.net" wrote:

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
> Tom Wickerath wrote:
> Date/Time values are stored in Access as numbers with decimal values, where
> the number is the number of days since Dec. 31, 1899 (if I recall correctly)
> and the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
> Noon, 0.75 = 6:00 PM, etc.).


I think you are a little confused. Under the covers, DATETIME values
are stored as Double (FLOAT). The values to the left of the decimal
point correspond to the number of days and the value to the right
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
represents the time.

> >= [DateFrom] AND < [DateTo] + 1


Here another suggestion (untested)

BETWEEN INT(CDATE([DateFrom]))
AND INT(CDATE([DateTo])) + TimeSerial(23, 59, 59)
Reply With Quote
  #6 (permalink)  
Old 08-Nov-2005, 12:53 PM
peregenem@jetemail.net's Avatar peregenem@jetemail.net
Guest
 
Posts: n/a
   
   
Re: Date Range with Timestamp


Tom Wickerath wrote:
> While I may have made some minor
> inconsequential mistakes due to the time of day (after midnight when I
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
> posted), I believe any reasonably intelligent person could figure out exactly
> what I was stating. I don't think this rises to the level of "I think you are
> a little confused". A little tired and sloppy, perhaps, but not confused.


A fellow pedant, eh? Can you tell me why you think "values are
stored in Access"?

Reply With Quote
  #7 (permalink)  
Old 08-Nov-2005, 12:53 PM
Mark's Avatar Mark
Guest
 
Posts: n/a
   
   
RE: Date Range with Timestamp

This sounds logical to me Tom - thanks for the reply.

I've tried your suggestion and it failed with a "too complex to be
evaluated...try simplifying the expression..."

Any ideas?

"Tom Wickerath" wrote:

> Hi Mark,
>
> Date/Time values are stored in Access as numbers with decimal values, where
> the number is the number of days since Dec. 31, 1899 (if I recall correctly)
> and the integer portion corresponds to the time of day (0.25 = 6:00 AM, 0.5 =
> Noon, 0.75 = 6:00 PM, etc.).
>
> If your criteria is written like this:
>
> Between [DateFrom] And [DateTo]
>
> You will only pick up records for the DateTo value where the integer portion
> is equal to zero (ie. midnight). Try the following instead:
>
> >= [DateFrom] AND < [DateTo] + 1

>
> A DateTo = 07-11-05 would result in all records less than midnight on
> 07-12-05 being included in the recordset.
>
>
> Tom
>
> http://www.access.qbuilt.com/html/ex...tributors.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
> __________________________________________
>
> "Mark" wrote:
>
> Hi.
>
> I'm using the parametres Between [DateFrom] And [DateTo] for the basis of
> business written within a month. Unfortunately, this query excludes the
> DateTo (ie. DateFrom = 01-11-05 DateTo = 07-11-05 results in data from
> 07-11-05 being excluded). Ive tried >= and <= to no avail. The dates are in
> the Timestamp format of 29-Jun-05 804 AM.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
>
> Can you please point me in the right direction to make this easier to handle.
>
> Regards,
>

Reply With Quote
  #8 (permalink)  
Old 08-Nov-2005, 12:53 PM
Tom Wickerath's Avatar Tom Wickerath
Guest
 
Posts: n/a
   
   
Re: Date Range with Timestamp

Ok JET.....but most people use the term Access and JET interchangeably (even
though they're distinctly different). Similarly, most people use the terms
"weight" and "mass" interchangeably, even though these two measures are very
different. Do I get any heartburn over this? Of course not.

Would you like for me to start scrutinizing every post you make? I can do
that if that's the game you want to play.

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
Tom
____________________________________________

"peregenem@jetemail.net" wrote:

A fellow pedant, eh? Can you tell me why you think "values are stored in
Access"?
Reply With Quote
  #9 (permalink)  
Old 08-Nov-2005, 13:10 PM
Tom Wickerath's Avatar Tom Wickerath
Guest
 
Posts: n/a
   
   
RE: Date Range with Timestamp

  Donate Today!  
Hi Mark,

Sorry, I didn't notice your second post due to the unnecessary noise
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
generated by "peregenem". Try this form, which makes use of the built-in
DateAdd function to add 1 day:

>=[DateFrom] And

You can look up DateAdd in Visual Basic Help if you want to learn more about
this function. The form I gave you the first time is actually more in line
with writing the WHERE portion of a SQL statement in code. For example, the
following line of code comes from a working function:

IncludeDates = IncludeDates & " AND ([AnswerDate] < #" & Me!txtEndDate + 1 &
"#)"

Sorry about the confusion.

Tom
_______________________________________________

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6834
"Mark" wrote:

This sounds logical to me Tom - thanks for the reply.

I've tried your suggestion and it failed with a "too complex to be
evaluated...try simplifying the expression..."

Any ideas?



Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
English Sri Guru Granth Sahib Ji Translations
By Ishna
Today 05:51 AM
1 Replies, 16 Views
What Really Happened on...
Today 05:36 AM
10 Replies, 136 Views
Free Online Gurbani...
Today 03:56 AM
13 Replies, 4,305 Views
English Sri Guru Granth...
Today 03:51 AM
5 Replies, 139 Views
Edward Snowden: the...
Today 03:34 AM
3 Replies, 117 Views
Difference in Bowing...
Today 03:31 AM
10 Replies, 221 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 03:23 AM
407 Replies, 9,385 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Yesterday 17:57 PM
255 Replies, 6,025 Views
What Is Difference...
Yesterday 09:18 AM
6 Replies, 174 Views
First There is Water by...
By Ishna
Yesterday 05:03 AM
3 Replies, 189 Views
Cooking Without Alcohol
Yesterday 02:12 AM
12 Replies, 188 Views
Learning from Baba...
Yesterday 01:38 AM
0 Replies, 310 Views
Eckhart Tolle
17-Jun-2013 18:08 PM
2 Replies, 118 Views
Thought of the Moment!
17-Jun-2013 16:35 PM
115 Replies, 6,079 Views
New Quantum Dot...
17-Jun-2013 09:38 AM
0 Replies, 62 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 06:04 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.51793 seconds with 32 queries
0