USER RESPONSE

I have a created a variable with following syntax

=“Requested Dates :”+ " "+FormatDate(ToDate(UserResponse(“SP_EDW_Week_Rated_Count_Pkg” , “7.Enter Start Date”) ,“mm/dd/yyyy”) ,“mm/dd/yyyy”)+ " To "+FormatDate(ToDate(UserResponse (“SP_EDW_Week_Rated_Count_Pkg” , “8.Enter end date”) ,“mm/dd/yyyy”) ,“mm/dd/yyyy”)

it works fine if user enters mm/dd/yyyy format but if user enter data time like 05/06/2009 12:00:00 AM THAN IT IS NOT WORKING
THE PROBLEM IS ToDate(UserResponse(“SP_EDW_Week_Rated_Count_Pkg” , “7.Enter Start Date”) ,“mm/dd/yyyy”) IS GIVING ERROR

ANY IDEA WHAT IS THE PROBLEM. PLEASE KINDLY HELP ME WITH SOLUTION.


rekha (BOB member since 2008-06-08)

Hi,

Why are you using these 2 functions?

FormatDate(ToDate(<something> ,"mm/dd/yyyy") ,"mm/dd/yyyy") 

If is in “mm/dd/yyyy” format that why do you need to convert it to date and then back to string of the same format as it was before? It looks redundant and could be removed.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Change To_Date format string …like below


ToDate(UserResponse(“SP_EDW_Week_Rated_Count_Pkg” , “7.Enter Start Date”) ,“mm/dd/yyyy hh:mi:ss”)

Thanks,


Rana :india: (BOB member since 2008-07-08)