473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Date placeholder

Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve this?

Regards

Jul 4 '08 #1
7 2197
On Jul 4, 7:06*am, "axapta" <jas.jac...@gmail.comwrote:
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/
Jul 4 '08 #2
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" <ja********@gmail.comwrote in message
news:A0**********************************@microsof t.com...
Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve
this?

Regards
Jul 4 '08 #3
A MaskedTextBox or a DateTimePicker support this. You just need to set the
appropriate formatting options on each.

"axapta" <ja********@gmail.comwrote in message
news:A0**********************************@microsof t.com...
Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve
this?

Regards
Jul 4 '08 #4
Axapta,

A web textbox or a windows form textbox, because the approach to that can be
different?

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:A0**********************************@microsof t.com...
Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve
this?

Regards
Jul 4 '08 #5
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]" <no************@planet.nlwrote in message
news:A0**********************************@microsof t.com...
Axapta,

A web textbox or a windows form textbox, because the approach to that can
be different?

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:A0**********************************@microsof t.com...
>Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve
this?

Regards
Jul 4 '08 #6
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" <ja********@gmail.comschreef in bericht
news:%2****************@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]" <no************@planet.nlwrote in message
news:A0**********************************@microsof t.com...
>Axapta,

A web textbox or a windows form textbox, because the approach to that can
be different?

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:A0**********************************@microso ft.com...
>>Hi
I need the input of a text field to be as dd/mm/yyyy how can I achieve
this?

Regards
Jul 4 '08 #7
"axapta" <ja********@gmail.comschrieb:
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/>

Jul 5 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike Speak | last post by:
I have a user control that I want to use to render 4 menu items (retrieved from db) on the top of each of my asp.net pages. The user control defines a table, with one TR and one TD. Within the...
2
by: Chad Crowder | last post by:
Is it possible to create a placeholder inside a template column of a datagrid? My goal is to use a placeholder, and during runtime add user controls to the placeholder as the items in the datagrid...
0
by: shark | last post by:
I have a placeholder in a control that is in turn, used as a control in a placeholder in a form. I am getting a viewstate error so I believe I have to clear my placeholder before I load the...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
1
by: TB | last post by:
Hi All: A kind soul provided by with the code for very nice calendar popup, which all in all works fine execpt for one thing: If I pick the current date (i.e. today's date) then the pop-up does...
0
by: TB | last post by:
Hi All: A kind soul provided by with the code for very nice calendar popup, which all in all works fine execpt for one thing: If I pick the current date (i.e. today's date) then the pop-up does...
3
by: andrew | last post by:
Hi, I am trying to develop a database that will store dates in the format - 21.02.2006 rather than the standard 21/02/2006. This is because of the SAP feeds that i am pulling in - since SAP...
6
by: David Colliver | last post by:
Hi, using vb.net 1.1 I am trying to add a control to a placeholder but am having problems with it. I do it practically the same way as i do in C# (I have more C# skill than VB.NET)and I...
7
by: Brad Baker | last post by:
I am trying to programmatically set a placeholder control in csharp which is nested inside a repeater control between <ItemTemplateand </ItemTemplate> tags, however I am running into problems. I've...
0
by: F | last post by:
Hi, The funniest part of the problem described here is that I am not new to ASP.NET, but honestly here I have no idea about what's going on. I have a GridView with a data source that just...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.