Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Input Mask for a unique date configuration

Author  Topic 

PhairOh
Starting Member

1 Post

Posted - 2005-08-01 : 09:22:35
Please bear with me as I'm relatively new to SQL databases.

I'm trying to set up some kind of input mask for my date fields. My database will be used by people around the globe so a unique date configuration is needed so that it is not misinterpreted.

The date needs to look like this:
01, Jan, 2005
21, Apr, 2004
etc.

Is there any way I can do this using SQL Server? Thanks in advance for any help you can give me.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-01 : 09:26:40
It is better to handle this in your presentation layer although it is possible thru SQL query

select convert(varchar,DateField,113)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ruman
Starting Member

2 Posts

Posted - 2009-12-25 : 09:00:30
hi,
my question is:

how to make input mask for telephon number( which is nchar) :111-111-111 ?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-12-28 : 00:46:53
quote:
Originally posted by ruman

hi,
my question is:

how to make input mask for telephon number( which is nchar) :111-111-111 ?



This is nothing to do with the question
Start a new thread


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

behrman
Yak Posting Veteran

76 Posts

Posted - 2010-01-03 : 10:33:07
Hi PhairOh,
Easiest way to do that is to use the format option rather than the input mask
d-mmm-yyyy will give you what you are looking for.
Or you can use the dd-mmm-yyyy for a two digit day number
ie 04-Sep-1948 with dd-mmm-yyyy
or 4-Sep-1948 with d-mmm-yyyy
I hope this is of some help
Cheers,
behrman.

RAQ Report: Web-based Excel-like Java reporting tool
Go to Top of Page
   

- Advertisement -