Hi I need the input of a text field to be as dd/mm/yyyy how can I achieve this? Regards
On Jul 4, 7:06 am, "axapta" wrote: > Hi > I need the input of a text field to be as dd/mm/yyyy how can I achieve this? > > Regards Simple: Don't allow the user to directly enter text into the text box and give them a calender control to pick the date from. Thanks, Seth Rowe [MVP] http://sethrowe.blogspot.com/
If you really wanted to use a textbox, could you not use a formatted box and then validate the numbers against a date command. If the date command works - its a valid date. If not - its not. Miro "axapta" wrote in message news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@microsoft.com... > Hi > I need the input of a text field to be as dd/mm/yyyy how can I achieve > this? > > Regards
A MaskedTextBox or a DateTimePicker support this. You just need to set the appropriate formatting options on each. "axapta" wrote in message news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@microsoft.com... > Hi > I need the input of a text field to be as dd/mm/yyyy how can I achieve > this? > > Regards
Axapta, A web textbox or a windows form textbox, because the approach to that can be different? Cor "axapta" schreef in bericht news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@microsoft.com... > Hi > I need the input of a text field to be as dd/mm/yyyy how can I achieve > this? > > Regards
OK, I implemented a calendar control. The problem seems to be in configuration. If I enter 07/06/2005 as a date, the results returned by the SQL SP are records which match 06/07/2005. I've set the language to British on the SQL Server ... "Cor Ligthert[MVP]" wrote in message news:A0CAEFA7-BF35-4F93-BD36-863758A9F458@microsoft.com... > Axapta, > > A web textbox or a windows form textbox, because the approach to that can > be different? > > Cor > > "axapta" schreef in bericht > news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@microsoft.com... >> Hi >> I need the input of a text field to be as dd/mm/yyyy how can I achieve >> this? >> >> Regards >
Axapta, But what is on your your client? As SQL server simple returns a DateTime, independent from the setting on the Server. I assume that you use parameters to select that. http://www.vb-tips.com/SQLParameters.aspx Cor "axapta" schreef in bericht news:%23tf0Gjf3IHA.5060@TK2MSFTNGP02.phx.gbl... > OK, I implemented a calendar control. The problem seems to be in > configuration. > If I enter 07/06/2005 as a date, the results returned by the SQL SP are > records which match 06/07/2005. > > I've set the language to British on the SQL Server ... > > "Cor Ligthert[MVP]" wrote in message > news:A0CAEFA7-BF35-4F93-BD36-863758A9F458@microsoft.com... >> Axapta, >> >> A web textbox or a windows form textbox, because the approach to that can >> be different? >> >> Cor >> >> "axapta" schreef in bericht >> news:A025D738-CBF7-4430-93DF-CC4EA9C5872C@microsoft.com... >>> Hi >>> I need the input of a text field to be as dd/mm/yyyy how can I achieve >>> this? >>> >>> Regards >> >
"axapta" schrieb: > I need the input of a text field to be as dd/mm/yyyy how can I achieve > this? In addition to the other replies: Note that different countries, languages, and cultures use different date and time formats. Thus it does not make much sense to tie the user to a certain date format which he is maybe not familiar to. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>