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

how can I format a Prompt Date?

Status
Not open for further replies.

Lee73

Technical User
Jan 16, 2004
20
0
0
IT
Hi everybody,

I have this little issue:

having a Date prompt like:

UserResponse ("Query 1 with UnvName" , "1. Insert a date")

the value shown in the report is for ex. "01/02/2004 00.00.00"
how can I truncate the above date to "01/02/2004" ?

Since now I cannot understand if the result of the Prompt Date is a Char or a Date...

Does anyone already faced this issue?

Thanks
Ciao

Sabry
 
Use FormatDate(UserResponse ("Query 1 with UnvName" , "1. Insert a date"),"dd/mm/yyyy") or "mm/dd/yyyy" depending on your date format
 
The result of your query in the dp will always be the same type as in the database. If you want to use the userresponse in a variable then it is always a CHAR type and will need to be converted using:

formatdate(todate(,),)

if you want to use it in date calculations etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top