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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change in date&time display

Status
Not open for further replies.

Lnxvas

Programmer
Oct 15, 2008
15
0
0
US
I have a report which as a field YEAR/MONTH/DAY/HR and result to be --- 2008/04/01 07 and the values i pulled from the database is like this MONTH/DAY/YEAR/HH:MM:SS(04/01/2008 07:00:00 am) so i edited the field in the report by using format field.
that's not the problem.

what i want is the value i pulled from database has the date & time with starting HR(ie 04/01/2008 07:00:00 am) and i need is date & time with ENDING HR(ie 04/01/2008 8:00:00 am)which i don't have in database so i have to add 1hr to the existing time.

can this be done in crystal reports? i am using CR2008

can i put(-) in between date and time(ie 2008/01/01-08) with the use of CR?

can anyone help with this?

Thanks
 
Use a formula like:

dateadd("h",1,{table.startdatetime})

-LB
 
Try the following for your record selection

{table.datetime} in [datetime(2008,4,1,7,0,0) to
datetime(2008,4,1,8,0,0)]
 
Ignore my solution. LBASS has the right solution.
 


Thanks guys,

Have Patience.I am new to CR2008

so when u asked me to use formula.should i use in date tab or time tab in format feild?

Thanks,

 
What will you do with the end datetime, once you have it? I meant for you to create it in field explorer->formula->new, and then you can use it wherever you need the end datetime--in the record selection formula or on the report itself.

-LB
 

thank u very much lbass. it worked...

thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top