Print Page | Close Window

Date and time

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19946
Printed Date: 28 Apr 2024 at 12:19pm


Topic: Date and time
Posted By: Wosp
Subject: Date and time
Date Posted: 26 Aug 2013 at 2:58am
Hi!
I got a report with a chart and on the chart i have date and time displayed like this :  2010-09-07  13:20:17 to 2014-10-13  07:00:00
What i want is only the date : 2010-09-07 to 2014-10-13 
 
The formula i have look like this:
Totext(minimum({AO.FFDATUM}) &
" to " &
Totext(Maximum({AO.FFDATUM})  )  )
 
Is there any way to get rid of the time?
 
 
 
ps.newbie
 
 



Replies:
Posted By: praveeng
Date Posted: 26 Aug 2013 at 3:26am
Hi,
 
Try with below code

Date({MyTable.dte_QDate})

HTH
 
--Praveen G


-------------
Praveen Guntuka,
praveen_guntuka@yahoo.com


Posted By: Wosp
Date Posted: 26 Aug 2013 at 3:47am
Dont know if im right here but if i do it like this:
 
Date({AO.FFDATUM})  it looks like: 2010-09-07   (all good)

Then i tried this: Date({AO.FFDATUM}) &" to " & Date({AO.FFDATUM})
It looks like this: 2010-09-07 to 2010-09-07

Propably me that done something wrong but the minimum and maximum seems to be important =o)


Posted By: Sastry
Date Posted: 26 Aug 2013 at 4:28am
HI

Try this :


Totext(minimum({AO.FFDATUM}),"MM/dd/yyyy") &
" to " &
Totext(Maximum({AO.FFDATUM}),"MM/dd/yyyy")

or

date(Minimum({AO.FEDATUM}))&" to " &Date(Maximum({AO.FEDATUM})

-------------
Thanks,
Sastry


Posted By: DBlank
Date Posted: 26 Aug 2013 at 4:30am
Yes you can use the min and max option in Praveeng's formula or yo0u can alter your original formula to use a fomat option
 
Totext(minimum({AO.FFDATUM}),"yyyy-MM-dd") &
" to " &
Totext(Maximum({AO.FFDATUM}),"yyyy-MM-dd" )
 
EDIT:
oops sorry, Sastry- answering at the same time Embarrassed


Posted By: Wosp
Date Posted: 26 Aug 2013 at 7:37pm
Worked perfect!
 
Thank you so much for all of your effort and help =o)



Print Page | Close Window