(CRY)stal Pro Select Criteria - Date

(CRY)stal Pro Select Criteria - Date

Post by Tom Wo » Sun, 18 Dec 1994 04:20:49



I am still working on the unix time stamp conversion stuff. I am using
VB to write reports from a Sybase database on a HP9000. I want to
take a unix time stamp table field into the report and convert it into a
date field.  Along the lines of Ian's suggestion I used this code to see
the correct date:

    Date(1970,1,1) + TRUNCATE({baddrum.time_stamp})/86400

The preceeding line is the function for the new column PROCESSED that I

I am guessing that when it comes time to print the report, I will click
the do not print option for the unix time column, which is a bunch of
8 or 9 digit integers.

Great.  Now what exactly is this date field that I created?  -
type date?  type string?

I get over 1000 rows into my report.  I want to set the criteria
to get only the dates after November 30, 1994.  I see how to use the
query helper to use the  "Aged0to30Days" function.  Where can I find
the code so I can modify it and write my own for a specific user entered
period?

DATE(1990,10,01) returns Oct 01 90 .  Is there a function that takes
Oct 01 90 and returns 1990,10,01?  What is the exact format of the
DATE type - "x" in this expression ==>   DayofWeek(x)

--
----------------------------------------------------------------------
We're on the information       //      
Highway to Hell ...          AC\\DC

 
 
 

(CRY)stal Pro Select Criteria - Date

Post by Ian McCutche » Mon, 19 Dec 1994 18:00:21


: I am still working on the unix time stamp conversion stuff. I am using
: VB to write reports from a Sybase database on a HP9000. I want to
: take a unix time stamp table field into the report and convert it into a
: date field.  Along the lines of Ian's suggestion I used this code to see
: the correct date:

:     Date(1970,1,1) + TRUNCATE({baddrum.time_stamp})/86400

Good to here.

: The preceeding line is the function for the new column PROCESSED that I

: I am guessing that when it comes time to print the report, I will click
: the do not print option for the unix time column, which is a bunch of
: 8 or 9 digit integers.

The field need not be on the report.  Delete it.

: Great.  Now what exactly is this date field that I created?  -
: type date?  type string?

: I get over 1000 rows into my report.  I want to set the criteria
: to get only the dates after November 30, 1994.  I see how to use the
: query helper to use the  "Aged0to30Days" function.  Where can I find
: the code so I can modify it and write my own for a specific user entered
: period?

Under the Print Menu (Or Report Menu 3.0) select edit record selection
formula.  Enter a formula like:

At run time with VB (delete any and all characters from the selection
formula and save the report first) use a line like this:


Report1.SelectionFormula = Temp$

If you need to use user entered data MSGBOX(Temp$) until you get the same
type of string as above.  Then you have the correct conactenation.

: DATE(1990,10,01) returns Oct 01 90 .  Is there a function that takes
: Oct 01 90 and returns 1990,10,01?  What is the exact format of the
: DATE type - "x" in this expression ==>   DayofWeek(x)

Date is the return type


Ian.

WWW FAQ for CRW Comming to a Web server near you soon (in the new year).

 
 
 

1. SQL: Select some data with date criteria, but only by Date part of date field

Hi!

I want to select some data with date criteria, but only by Date part of date
field. This is an example:

DateField:

11.12.2002 04:08:12
12.12.2002 07:25:24
13.12.2002 05:19:01
13.12.2002 03:10:01

When I'm using:
Select * From XX Where DateField = '2002-12-13'

This just doesn't work (result is empty).

I'm using this:
"Select * From XX
Where (DateField between  CONVERT (DATETIME, '2002-12-13 00:00:00', 102) And
CONVERT(DATETIME, '2002-12-13   23:59:59', 102) )

Can anyone suggest something better?

2. Why Not All Data Are Included When Upgrading to SQL 2000?

3. FileMaker Pro - Search for specific criteria

4. Using Relations in Screens...

5. TimeStamp fields and Date selection criteria in SQL

6. FREE Visual Basic...

7. Date criteria

8. Wfw3.11 And .Net File

9. Statement on date criteria

10. ODBC Criteria for Date fields

11. Pdoxwin 5 problem: dates as setgenfilter criteria: Solved

12. Strange date criteria.