Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trading day

Status
Not open for further replies.

Ksquared

Technical User
Mar 24, 2002
12
0
0
AU
Im trying to create a report that when prompted for a date, instead of assuming the day starts and ends at 00:00, the trading day starts at 10:00 and finishes at 04:00 or 06:00 the following day.
Any ideas would be most welcome!
 
Create two formulas to encompass the time you want:

@from this time
datetime(year({?Date}),month({?Date}),day({?Date}),10,00,00)

@to this time
datetime(year(date(dateadd("d",1,{?Date}))),month(date(dateadd("d",1,{?Date}))),day(date(dateadd("d",1,{?Date})))
,04,00,00)


Then in your selection expert:
{datetime.field} in {@from this time} to {@to this time}


Above combination will give you transaction that have occured from 10AM to 4AM the next day. Mike

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top