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

Accepting a date from the user

Status
Not open for further replies.

Vandys

IS-IT--Management
Aug 3, 2000
29
AU
I am trying to insert a condition where the user enters date at a prompt and then all the records where the datefield is less then the accepted value should be displayed. I am not able to find&nbsp;&nbsp;a function to convert the string into date. My database is on Access 97. Please help me. I am new user/designer on BO.<br><br>Vandys
 
I don't understand why you need to convert the date?&nbsp;&nbsp;Are you trying to do something with the list of dates that is returned?&nbsp;&nbsp;I would use a condition along the lines of:<br><br>Mydate Less Than Prompt('Enter a date value')<br><br>Do you need something more?&nbsp;&nbsp;There is a ToDate command... <p> Nick<br><a href=mailto:ndaniels@ventura-uk.com>ndaniels@ventura-uk.com</a><br><a href= > </a><br>If it's Data Warehousing or related then I want to know - but post it to the forum!
 
I tried that Nick, but when I parse the condition the message I get is &quot;Parse Failed [Microsoft]ODBC Microsoft Access 97 Driver] Data type mismatch in criteria expression&quot;<br>The condition I gave was <br><br>TableName.FieldName &lt;= @Prompt('Enter the date',,,,)<br><br>Using ToDate function gives a message &quot;Undefined function ToDate&quot;.<br>Am I doing some basic error??? I am very new to BO. Please help!!!!<br><br>Vandys
 
Hmm, well I'm still not 100% on what you're doing but I guess you are creating an object. So in your select clause you've got 'mydate' and in your where clause you should have something along the lines of

@Prompt('Enter date',date,Mydateclass.mydate,multi,free)

Is this what you are doing?

Nick
 
Let me try to explain again what I am trying to do. I have created a class called 'Activites'. In this class I have an object called 'StartDate'. In this class I wish to create a condition called 'StartingFrom' which should accept a date from the user and apply a filter where all the records with Activities.StartDate >= the accepted date will be selected.

I hope I am able to bring some clarity to my requirement. There is nobody in my company or among my friends who know Business Objects. Also the help in BO is not so helpful!!!

All your help is appreciated.

Vandys
 
Hi Nick, the problem I was facing is no longer there... Actually I was doing a mistake... In the prompt function the data type of the date should be mentioned as 'D' not 'DATE'. The command I was giving was

@Prompt('Enter date',date,Mydateclass.mydate,multi,free)
and it should have been
@Prompt('Enter date','D',Mydateclass.mydate,'MULTI','FREE')

Now I am facing a very wierd problem. I am not able to use CTRL key for multiple selection in the above function. Though this key is working for other things like multiple selection in MS Access etc. but not in BO. I know it is a wierd thing to ask... but any guesses why it is happening so?
Thanks in advance...
Vandys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top