Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date and time Post Reply Post New Topic
Author Message
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Topic: Date and time
    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
 
 
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet 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
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet 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)
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet 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})

Edited by Sastry - 26 Aug 2013 at 4:31am
Thanks,
Sastry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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


Edited by DBlank - 26 Aug 2013 at 4:31am
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 26 Aug 2013 at 7:37pm
Worked perfect!
 
Thank you so much for all of your effort and help =o)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.