Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Formating a date field Post Reply Post New Topic
Author Message
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Topic: Formating a date field
    Posted: 08 Jul 2013 at 2:20am
I am creating a report to show if a purchased part has been received.  I would like to have the letter "TBD" to show if the item hasnt been recieved other wise show the date it was received. 
 
what I have in there now is
 
if isnull ({Table.field})
then
"TBD"
else
totext ({Table.field})
 
With this formula I am unable to then format the the way the date is displayed? 
 
im sure there is a different formula to accomplish this, but I do not know what operators to use. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jul 2013 at 3:50am
in the totext(date) you can include formatting options
 
e.g. totext(table.date,"M/d/yy")
 
from crystal help here are the options
Character Comments

d

day of month without leading zero for single digits

dd

day of month with leading zero for single digits.

ddd

day of week as a three letter abbreviation

dddd

full name of day of week

M

month without leading zero for single digit

MM

month with leading zero for single digit

MMM

month as three letter abbreviation.

MMMM

full name of month

yy

last two digits of year

yyyy

full four digits of year

h

hours without leading zeros for single digits (12 hour)

hh

hours without leading zeros for single digits (12 hour).

H

hours without leading zeros for single digits (24 hour)

HH

hours with leading zeros for single digits (24 hour)

m

minutes without leading zeros for single digits

mm

minutes with leading zeros for single digits

s

seconds without leading zeros for single digits

ss

seconds with leading zeros for single digits

t, tt

single character or multiple character a.m./p.m. string

 
 
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 08 Jul 2013 at 4:08am

Thank you.

 
that did it
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.047 seconds.