Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Query Post Reply Post New Topic
Author Message
SwindonYid
Newbie
Newbie
Avatar

Joined: 26 Jan 2010
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote SwindonYid Replybullet Topic: Date Query
    Posted: 26 May 2010 at 10:24pm
Hi All,
 
I've searched for the solution to this but just cannot figure it out!!!
 
I have a date/time field in an SQL database that I need to do the following with......
 
Check if it is blank/null and if it is output a string ie "No Date Set" and if not then output the date after doing some work on it.
 
the date is in dd/mm/yyyy HH:MM:SS format
 
My problem is that I am fairly new to Crystal and cannot figure out how to convert a date to a string so that the txt can be allocated?
 
Hope this makes sense to someone....lol
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 May 2010 at 3:55am
Create a formula field as :
if isnull(table.datefield) then 'No Date Set' else totext(table.datefield,'dd/MM/yyyy hh:mm:ss tt')
IP IP Logged
SwindonYid
Newbie
Newbie
Avatar

Joined: 26 Jan 2010
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote SwindonYid Replybullet Posted: 01 Jun 2010 at 8:56pm

Brilliant, many thanks for that.

Much appreciated
 
Clap
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.016 seconds.