Date formats, culture and globalization

Hi,

ASP.NET 3.5

We are creating a 3-tier ASP.NET Web Application that needs just to
understand dates as UK shortdate format (dd/MM/yyyy). It will only be
used in the UK on intranet. I often come across web server and client
machine that are incorrectly set up so I want to protect the app from
these incorrectly set up hosts.

I understand the safe date formats for passing through to the
database. SQLParameters pass through a non-ambiguous format and also
that 'yyyyMMdd' is also a safe format. So ignore the database side of
things - I get that.

At the moment all the bound controls are done as follows:
<%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>

This nicely controls the inputs, but would it be better to put the
following line in web.config:
<globalization uiCulture="en" culture="en-GB" />
and then specify the short date format on the page:
<%# Bind("spouse_date_of_birth","{0:d}") %>

Also, if we fail to convert all strings in the UI layer and then
convert them in the BLL or DLL layer, what culture would those
assemblies/DLLs use in the date conversion? Do they use the values
specified in the web.config or do you specify them separately?

One thing I am sure about is that I want to isolate the ASP.NET app
from the culture settings on the web server and the client machine.

Cheers,

James
0
JimLad
1/22/2010 10:52:46 AM
dotnet.framework.aspnet 1425 articles. 0 followers. Follow

6 Replies
1397 Views

Similar Articles

[PageSpeed] 31

On Jan 22, 11:52=A0am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
> Hi,
>
> ASP.NET 3.5
>
> We are creating a 3-tier ASP.NET Web Application that needs just to
> understand dates as UK shortdate format (dd/MM/yyyy). It will only be
> used in the UK on intranet. I often come across web server and client
> machine that are incorrectly set up so I want to protect the app from
> these incorrectly set up hosts.
>
> I understand the safe date formats for passing through to the
> database. SQLParameters pass through a non-ambiguous format and also
> that 'yyyyMMdd' is also a safe format. So ignore the database side of
> things - I get that.
>
> At the moment all the bound controls are done as follows:
> <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> This nicely controls the inputs, but would it be better to put the
> following line in web.config:
> <globalization uiCulture=3D"en" culture=3D"en-GB" />
> and then specify the short date format on the page:
> <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> Also, if we fail to convert all strings in the UI layer and then
> convert them in the BLL or DLL layer, what culture would those
> assemblies/DLLs use in the date conversion? Do they use the values
> specified in the web.config or do you specify them separately?
>
> One thing I am sure about is that I want to isolate the ASP.NET app
> from the culture settings on the web server and the client machine.
>
> Cheers,
>
> James

Just use <globalization uiCulture=3D"en-GB" culture=3D"en-GB" /> and your
date will be automatically shown in UK format. You will not need to
bother about format in <%# Bind(...)%> statement. ASP.NET uses web
application settings from the web.config file. It doesn't rely on
client or server settings.

0
Alexey
1/22/2010 11:32:29 AM
On 22 Jan, 11:32, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On Jan 22, 11:52=A0am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
>
>
>
>
> > Hi,
>
> > ASP.NET 3.5
>
> > We are creating a 3-tier ASP.NET Web Application that needs just to
> > understand dates as UK shortdate format (dd/MM/yyyy). It will only be
> > used in the UK on intranet. I often come across web server and client
> > machine that are incorrectly set up so I want to protect the app from
> > these incorrectly set up hosts.
>
> > I understand the safe date formats for passing through to the
> > database. SQLParameters pass through a non-ambiguous format and also
> > that 'yyyyMMdd' is also a safe format. So ignore the database side of
> > things - I get that.
>
> > At the moment all the bound controls are done as follows:
> > <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> > This nicely controls the inputs, but would it be better to put the
> > following line in web.config:
> > <globalization uiCulture=3D"en" culture=3D"en-GB" />
> > and then specify the short date format on the page:
> > <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> > Also, if we fail to convert all strings in the UI layer and then
> > convert them in the BLL or DLL layer, what culture would those
> > assemblies/DLLs use in the date conversion? Do they use the values
> > specified in the web.config or do you specify them separately?
>
> > One thing I am sure about is that I want to isolate the ASP.NET app
> > from the culture settings on the web server and the client machine.
>
> > Cheers,
>
> > James
>
> Just use <globalization uiCulture=3D"en-GB" culture=3D"en-GB" /> and your
> date will be automatically shown in UK format. You will not need to
> bother about format in <%# Bind(...)%> statement. ASP.NET uses web
> application settings from the web.config file. It doesn't rely on
> client or server settings.- Hide quoted text -
>
> - Show quoted text -

Thanks.

How would I set the Culture and UI Culture for the BLL and DAL layers
in separate VB.NET dlls?

James
0
JimLad
1/22/2010 6:24:42 PM
Hi,

You shouldn't. The idea is to convert to a text representation at the very 
end and from a text representation as soon as possible (that is in the UI 
layer). Your BLL and DAL should deal with dates, and shouldn't have anything 
to convert. Have you run into an issue or is it a question you ask just in 
case ?

--
Patrice


"JimLad" <jamesdbirch@yahoo.co.uk> a �crit dans le message de 
news:5e03c5b5-c032-49a1-87fa-1f0402dc4c46@y23g2000yqm.googlegroups.com...
On 22 Jan, 11:32, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On Jan 22, 11:52 am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
>
>
>
>
> > Hi,
>
> > ASP.NET 3.5
>
> > We are creating a 3-tier ASP.NET Web Application that needs just to
> > understand dates as UK shortdate format (dd/MM/yyyy). It will only be
> > used in the UK on intranet. I often come across web server and client
> > machine that are incorrectly set up so I want to protect the app from
> > these incorrectly set up hosts.
>
> > I understand the safe date formats for passing through to the
> > database. SQLParameters pass through a non-ambiguous format and also
> > that 'yyyyMMdd' is also a safe format. So ignore the database side of
> > things - I get that.
>
> > At the moment all the bound controls are done as follows:
> > <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> > This nicely controls the inputs, but would it be better to put the
> > following line in web.config:
> > <globalization uiCulture="en" culture="en-GB" />
> > and then specify the short date format on the page:
> > <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> > Also, if we fail to convert all strings in the UI layer and then
> > convert them in the BLL or DLL layer, what culture would those
> > assemblies/DLLs use in the date conversion? Do they use the values
> > specified in the web.config or do you specify them separately?
>
> > One thing I am sure about is that I want to isolate the ASP.NET app
> > from the culture settings on the web server and the client machine.
>
> > Cheers,
>
> > James
>
> Just use <globalization uiCulture="en-GB" culture="en-GB" /> and your
> date will be automatically shown in UK format. You will not need to
> bother about format in <%# Bind(...)%> statement. ASP.NET uses web
> application settings from the web.config file. It doesn't rely on
> client or server settings.- Hide quoted text -
>
> - Show quoted text -

Thanks.

How would I set the Culture and UI Culture for the BLL and DAL layers
in separate VB.NET dlls?

James 

0
Patrice
1/22/2010 9:44:56 PM
On Jan 22, 7:24=A0pm, JimLad <jamesdbi...@yahoo.co.uk> wrote:
> On 22 Jan, 11:32, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
>
>
>
>
> > On Jan 22, 11:52=A0am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
> > > Hi,
>
> > > ASP.NET 3.5
>
> > > We are creating a 3-tier ASP.NET Web Application that needs just to
> > > understand dates as UK shortdate format (dd/MM/yyyy). It will only be
> > > used in the UK on intranet. I often come across web server and client
> > > machine that are incorrectly set up so I want to protect the app from
> > > these incorrectly set up hosts.
>
> > > I understand the safe date formats for passing through to the
> > > database. SQLParameters pass through a non-ambiguous format and also
> > > that 'yyyyMMdd' is also a safe format. So ignore the database side of
> > > things - I get that.
>
> > > At the moment all the bound controls are done as follows:
> > > <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> > > This nicely controls the inputs, but would it be better to put the
> > > following line in web.config:
> > > <globalization uiCulture=3D"en" culture=3D"en-GB" />
> > > and then specify the short date format on the page:
> > > <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> > > Also, if we fail to convert all strings in the UI layer and then
> > > convert them in the BLL or DLL layer, what culture would those
> > > assemblies/DLLs use in the date conversion? Do they use the values
> > > specified in the web.config or do you specify them separately?
>
> > > One thing I am sure about is that I want to isolate the ASP.NET app
> > > from the culture settings on the web server and the client machine.
>
> > > Cheers,
>
> > > James
>
> > Just use <globalization uiCulture=3D"en-GB" culture=3D"en-GB" /> and yo=
ur
> > date will be automatically shown in UK format. You will not need to
> > bother about format in <%# Bind(...)%> statement. ASP.NET uses web
> > application settings from the web.config file. It doesn't rely on
> > client or server settings.- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks.
>
> How would I set the Culture and UI Culture for the BLL and DAL layers
> in separate VB.NET dlls?
>
> James

CultureInfo.CurrentCulture

If you use dates you normally don't need it. If any string comparisons
must be done, either use current culture or a culture-invariant string
comparison.

CultureInfo.CurrentCulture
CultureInfo.InvariantCulture

More about CultureInfo
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.as=
px

Hope this helps
0
Alexey
1/24/2010 10:39:48 AM
On 24 Jan, 10:39, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On Jan 22, 7:24=A0pm, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
>
>
>
>
> > On 22 Jan, 11:32, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
> > > On Jan 22, 11:52=A0am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
> > > > Hi,
>
> > > > ASP.NET 3.5
>
> > > > We are creating a 3-tier ASP.NET Web Application that needs just to
> > > > understand dates as UK shortdate format (dd/MM/yyyy). It will only =
be
> > > > used in the UK on intranet. I often come across web server and clie=
nt
> > > > machine that are incorrectly set up so I want to protect the app fr=
om
> > > > these incorrectly set up hosts.
>
> > > > I understand the safe date formats for passing through to the
> > > > database. SQLParameters pass through a non-ambiguous format and als=
o
> > > > that 'yyyyMMdd' is also a safe format. So ignore the database side =
of
> > > > things - I get that.
>
> > > > At the moment all the bound controls are done as follows:
> > > > <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> > > > This nicely controls the inputs, but would it be better to put the
> > > > following line in web.config:
> > > > <globalization uiCulture=3D"en" culture=3D"en-GB" />
> > > > and then specify the short date format on the page:
> > > > <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> > > > Also, if we fail to convert all strings in the UI layer and then
> > > > convert them in the BLL or DLL layer, what culture would those
> > > > assemblies/DLLs use in the date conversion? Do they use the values
> > > > specified in the web.config or do you specify them separately?
>
> > > > One thing I am sure about is that I want to isolate the ASP.NET app
> > > > from the culture settings on the web server and the client machine.
>
> > > > Cheers,
>
> > > > James
>
> > > Just use <globalization uiCulture=3D"en-GB" culture=3D"en-GB" /> and =
your
> > > date will be automatically shown in UK format. You will not need to
> > > bother about format in <%# Bind(...)%> statement. ASP.NET uses web
> > > application settings from the web.config file. It doesn't rely on
> > > client or server settings.- Hide quoted text -
>
> > > - Show quoted text -
>
> > Thanks.
>
> > How would I set the Culture and UI Culture for the BLL and DAL layers
> > in separate VB.NET dlls?
>
> > James
>
> CultureInfo.CurrentCulture
>
> If you use dates you normally don't need it. If any string comparisons
> must be done, either use current culture or a culture-invariant string
> comparison.
>
> CultureInfo.CurrentCulture
> CultureInfo.InvariantCulture
>
> More about CultureInfohttp://msdn.microsoft.com/en-us/library/system.glob=
alization.culturei...
>
> Hope this helps- Hide quoted text -
>
> - Show quoted text -

Thanks. That's what I thought. However I've recently been stuggling
with BLL Validation and when and where it should occur.

I have a Gridview using an ObjectDataSource. This is a standard thing
that I'll be doing on loads of pages and I will be creating a template
for this.

So obviously I can validate in the Gridview_Updating event. However,
nothing is typed at this point so I would have to type everything
manually. Things are typed in ObjectDataSource_Updating, but by then
I've lost the e.cancel function and would have to raise an exception
to cancel.
Returning to Gridview_Updating I can pass the typed values I need
individually or I can pass the IOrderDictionary of values, newvalues
or keys. However these are untyped and I would have to them type them
in the BLL layer so I've rejected this option.

Or I can Validate in the BLL layer in the Update function. I have a
Generic List of validation failures to return and I also want to keep
the entered values on the page, not refresh the page if there are
validation problems. The only way to prevent the page from refreshing
seems to be to return an exception to GridView_Updated. I could create
a new Exception which contains the Validation Error Generic List. But
I have always thought that Exceptions should not be raised for
standard functionality like this?

Basically I want to limit bespoke validation functionality to the BLL
layer and not have to do manual typing on the UI layer. But I can't
seem to find a way of doing that without raising exceptions.

Any advice would be very welcome. If these are the only 2 options,
which should I do? I realise it would take very little effort to type
values manually on the UI side for each page, but I always like to
standardise code where possible.

James







0
JimLad
1/25/2010 10:54:54 AM
On 25 Jan, 10:54, JimLad <jamesdbi...@yahoo.co.uk> wrote:
> On 24 Jan, 10:39, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
>
>
>
>
> > On Jan 22, 7:24=A0pm, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
> > > On 22 Jan, 11:32, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
> > > > On Jan 22, 11:52=A0am, JimLad <jamesdbi...@yahoo.co.uk> wrote:
>
> > > > > Hi,
>
> > > > > ASP.NET 3.5
>
> > > > > We are creating a 3-tier ASP.NET Web Application that needs just =
to
> > > > > understand dates as UK shortdate format (dd/MM/yyyy). It will onl=
y be
> > > > > used in the UK on intranet. I often come across web server and cl=
ient
> > > > > machine that are incorrectly set up so I want to protect the app =
from
> > > > > these incorrectly set up hosts.
>
> > > > > I understand the safe date formats for passing through to the
> > > > > database. SQLParameters pass through a non-ambiguous format and a=
lso
> > > > > that 'yyyyMMdd' is also a safe format. So ignore the database sid=
e of
> > > > > things - I get that.
>
> > > > > At the moment all the bound controls are done as follows:
> > > > > <%# Bind("spouse_date_of_birth","{0:dd/MM/yyyy}") %>
>
> > > > > This nicely controls the inputs, but would it be better to put th=
e
> > > > > following line in web.config:
> > > > > <globalization uiCulture=3D"en" culture=3D"en-GB" />
> > > > > and then specify the short date format on the page:
> > > > > <%# Bind("spouse_date_of_birth","{0:d}") %>
>
> > > > > Also, if we fail to convert all strings in the UI layer and then
> > > > > convert them in the BLL or DLL layer, what culture would those
> > > > > assemblies/DLLs use in the date conversion? Do they use the value=
s
> > > > > specified in the web.config or do you specify them separately?
>
> > > > > One thing I am sure about is that I want to isolate the ASP.NET a=
pp
> > > > > from the culture settings on the web server and the client machin=
e.
>
> > > > > Cheers,
>
> > > > > James
>
> > > > Just use <globalization uiCulture=3D"en-GB" culture=3D"en-GB" /> an=
d your
> > > > date will be automatically shown in UK format. You will not need to
> > > > bother about format in <%# Bind(...)%> statement. ASP.NET uses web
> > > > application settings from the web.config file. It doesn't rely on
> > > > client or server settings.- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > Thanks.
>
> > > How would I set the Culture and UI Culture for the BLL and DAL layers
> > > in separate VB.NET dlls?
>
> > > James
>
> > CultureInfo.CurrentCulture
>
> > If you use dates you normally don't need it. If any string comparisons
> > must be done, either use current culture or a culture-invariant string
> > comparison.
>
> > CultureInfo.CurrentCulture
> > CultureInfo.InvariantCulture
>
> > More about CultureInfohttp://msdn.microsoft.com/en-us/library/system.gl=
obalization.culturei...
>
> > Hope this helps- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks. That's what I thought. However I've recently been stuggling
> with BLL Validation and when and where it should occur.
>
> I have a Gridview using an ObjectDataSource. This is a standard thing
> that I'll be doing on loads of pages and I will be creating a template
> for this.
>
> So obviously I can validate in the Gridview_Updating event. However,
> nothing is typed at this point so I would have to type everything
> manually. Things are typed in ObjectDataSource_Updating, but by then
> I've lost the e.cancel function and would have to raise an exception
> to cancel.
> Returning to Gridview_Updating I can pass the typed values I need
> individually or I can pass the IOrderDictionary of values, newvalues
> or keys. However these are untyped and I would have to them type them
> in the BLL layer so I've rejected this option.
>
> Or I can Validate in the BLL layer in the Update function. I have a
> Generic List of validation failures to return and I also want to keep
> the entered values on the page, not refresh the page if there are
> validation problems. The only way to prevent the page from refreshing
> seems to be to return an exception to GridView_Updated. I could create
> a new Exception which contains the Validation Error Generic List. But
> I have always thought that Exceptions should not be raised for
> standard functionality like this?
>
> Basically I want to limit bespoke validation functionality to the BLL
> layer and not have to do manual typing on the UI layer. But I can't
> seem to find a way of doing that without raising exceptions.
>
> Any advice would be very welcome. If these are the only 2 options,
> which should I do? I realise it would take very little effort to type
> values manually on the UI side for each page, but I always like to
> standardise code where possible.
>
> James- Hide quoted text -
>
> - Show quoted text -

I am reposting this as a new topic.
James
0
JimLad
1/26/2010 2:50:57 PM
Reply:

Similar Artilces:

Date format issue when submitting from a userform to a spreadsheet
Hi, I have a userform that I've generated which routes dates onto a spreadsheet based on the users input. I am having a bit of a frustrating time with the dates, it would appear that in the process of moving the date from the userform to the spreadsheet some dates are switched/transposed. I'll give an example. If someone enters 09/02/2004 on the userform excel seems to look at 09 and assume it is a month and transposes the dates to 02/09/2004(this does not appear to be a US/UK format issues as I have already gone down that road). However, if the date 13/09/2004 is entered i...

Change default font format in Excel
I have an existing workbook with cell text entries in regular black font. I want to make a number of additional entries in various cells in this workbook, and I want all my text entries to be a different font format (bold, red). Is there a way to do this automatically without highlighting each entry I make and manually changing the cell format? Thanks. Michael, Copy the code below, right-click on your sheet tab, select "View Code" and paste the code in the window that appears. HTH, Bernie MS Excel MVP Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Cou...

Pivot Table formatting #6
When I format my pivot tables I have "preserve formatting" checked under "PivotTable Options", and "Autoformat Table" unchecked. Even so, I either lose portions of my formatting, or different formatting is applied when I refresh. Does anyone know what I am doing incorrectly or have any other suggestions? Thanks, Phil Other things to try -- if they don't work, you could record a macro as you refresh and reformat the pivot table. Then, run that when you want to update. --Instead of selecting the cells to format the numbers, right-click the field but...

Custom cell formatting
I need to create a custom format for a series of cells that will begin like this. I can't figure out what the code character is fora volitile potentially alpha character. Can anyone help me?? -Monica, Dallas 000000 000001 000002 .... 000009 00000A 00000B 000010 000011 ...... Monica something like this might work for you but you'll need to put all the leading digits in for the entry with the alpha character Regards Trevor "MDavison" <davison@fr.com> wrote in message news:#SD0tUzTEHA.1652@TK2MSFTNGP09.phx.gbl... > I need to create a custom format for a series ...

Auto formatting features: How do I align page numbers in publicati
I've got a problem with my publication. I can't align even page numbers to the left without automatic moving the odd numbers to the left as well? Can someone help me? Cissy99 wrote: > I've got a problem with my publication. I can't align even page numbers to > the left without automatic moving the odd numbers to the left as well? Can > someone help me? You need to create a two-page master rather than a one-page master. What version of Publisher are you running? -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org ...

Keyboard shortcut for current date and time
Hi, Ctrl+ ; inserts current date and Ctrl+Shift+; inserts current ti me Ctrl+Shift+; inserts the current time with the date serial as 0 and not the current date's date serial. Presently I am adding the two (ie current date and time) to get the current date and time. Is there a keyboard shortcut that does this? Thanks in advance. Regards, Raj CTRL+; then SPACE then CTRL+SHIFT+; -or- =Now() -- Jim Cone Portland, Oregon USA http://www.mediafire.com/PrimitiveSoftware "Raj" <rspai9@gmail.com> wrote in message Hi, Ctrl+ ; inserts current dat...

how to turn off automatic format in Excel?
Hi Excel automatically change the first character in a cell to be uppercase. I just want lowercase. How can I turn off this function? Thanks Ngoc Hi Go to Tools / Autocorrect and uncheck Capitalize first letter of sentence. Andy. "ngoc" <linh@chello.no> wrote in message news:BOKNb.271$O41.819@amstwist00... > Hi > Excel automatically change the first character in a cell to be > uppercase. I just want lowercase. How can I turn off this function? > Thanks > Ngoc > ...

Formatting
I've always used MS Word as my email editor in Outlook. Is this possible in Live Mail. Nope. I'm afraid that's only possible using Outlook. In WLM you have to use the built in editor. Is there anything in particular that's lacking from the built in editor that you're looking for? Colin Brown WL MVP "jrchambe" <jrchambe@discussions.microsoft.com> wrote in message news:5EC21892-D39F-4219-AB0F-47BC14E1CD36@microsoft.com... > I've always used MS Word as my email editor in Outlook. Is this possible > in > Live Mail. "...

Formating
Hi, In a Column 'A' sales Commission is calculated and resulta is as 250, 200, 300, 330. I wanted to format a cell with a Blinking colours where value is 100 to 250, 250 to 300, 300 to 350 and 350 & above. please help to format my sheet ... thanks Ismail, Getting your cells to "blink" is not in the standard Excel formats What you want would require some extensive programming, certainly, ou of my capabilities. However, there are some great things you can do with Excel' CONDITIONAL FORMATTING. Let's say in column A you have numbers that are the result of formu...

Compare Now() to a European date
This is driving me nuts, I have a list of certificates. In column B their expiry dates are entered as Europeans, some at least, do. Like today would be 20080524. I want these cells to change colour with conditional formating. For instance becoming yellow when there is less than three months between now and the expiry date, and then becoming red when there is less than one month to expiry. Else they should remain without colour. I have read through a hundred posts dealing with similar needs and seemingly fine replies, but I get nowhere with my particular sheet. When I format my B cell as ...

Formula for date field
1.I have simple dates in one column (say column A) . 2.In the next column(Column B) I would like the date five months after Column A to be displayed.Eg if Column A has an entry of 9th June 2007,Column B should display 8th November,2007. 3.A simple formula does not do the job as this does not take into account the different number of days in different months! regards S.Sanatani Your post is a bit ambiguous since you don't really say how the different number of days in months should be handled. One way: A1: <date> B1: =DATE(YEAR(A1),MONTH(A1)+5,DAY(A1)-1) In articl...

Date Format turn to Year
Hi, I tried to convert the date to YEAR and then the year plus 25 Years later. =Year(A1) I'm getting the result 1900 instead of 1965. I tried to add 25 years later to 1990 from 1965. Your help would be much apprecated. Thanks What's in A1? Are you sure it's a real date? "learning_codes@hotmail.com" wrote: > > Hi, > > I tried to convert the date to YEAR and then the year plus 25 Years > later. > > =Year(A1) I'm getting the result 1900 instead of 1965. > > I tried to add 25 years later to 1990 from 1965. > > Your ...

Opening and formating a CSV file?
Could someone remind me how to handle CSV files please? I had assumed the Text Import Wizard would pop-up when I use File|Open, but the data goes straight into the worksheet. (Presumably because it is not 'delimited'?) Without the Wizard at my side, how do I get each comma-separated field in its own column? -- Terry, West Sussex, UK Try renaming your .csv file to .txt Terry Pinnell wrote: > > Could someone remind me how to handle CSV files please? I had assumed > the Text Import Wizard would pop-up when I use File|Open, but the data > goes straight into the worksheet...

Problem access variable in On Format
Hi, I'm using Access via Office XP Pro. I am trying to format the Zip Code on the detail line of my report. I have tried the following lines of code in both the On Format event and the On Print event: If len([PostalCode]) > 5 Then : : end if or if len(Me.PostalCode) > 5 Then : : end if In both events and either code, I receive the error message: Access can't find the field 'PostalCode' referred to in your expression. If I put "PostalCode" as the source of the report's control...

Formatting Cells in Excel 97
Hi Guys, Sorry if I sound real stupid but is there anyway that we can control the column formatting in Excel 97 like let's say column A = GENERAL(6), column B = GENERAL(4), column C = TEXT(18) etc? Appreciate any form of advice, thanks!! I replied in the programming group. Are you seeking a programming answer? It's usually best to only post to one group, and include the remark "Please tell me if I should ask this in another group." On Thu, 28 Aug 2003 00:56:47 -0700, "Daryl" <daryl.ho@tnt.com> wrote: >Hi Guys, > >Sorry if I sound real stupid b...

using dates Part 2
Karl was great in helping me get to this point with dates, now I'm wondering if we can take it 1 step further? For Activity Dates prior to 2/1/2007 they are using a normal reporting year and the formulas below take care of Activity dates >2/1/2007? So for example prior to 2/1/2007 1/1/2006 would have a B_Qtr of 2006-1 1) B_Qtr - 2011-1 --- Format(DateAdd("m",11,[ActivityDate]), "yyyy - q") 2) Year - 2011 ---- Year(DateAdd("m",11,[ActivityDate])) 3) Qtr - Q1 ---- Format(DateAdd("m",11,[ActivityDate]), "q") -- Than...

Today's date on an Active X Calendar
Could anyone tell me how to set the properties so that the ActiveX calendar I have in the database, displays the current date when the program is openend. I thought this would have been easy, but obviously not! Thanks for any help. CEL504 wrote: > Could anyone tell me how to set the properties so that the ActiveX calendar I > have in the database, displays the current date when the program is openend. > > I thought this would have been easy, but obviously not! > > Thanks for any help. http://groups.google.com/group/comp.databases.ms-access/msg/1564d683ede98f8c Jame...

How do I view all Global Catalog Servers in Active Directory
Guys, Is there a way to view and confirm all the Global Catalog Servers in Active Directory? I'll appreciate your help.Regards. -- Buchi On Sat, 6 Aug 2005 08:21:01 -0700, "Buchi" <Buchi@discussions.microsoft.com> wrote: >Guys, >Is there a way to view and confirm all the Global Catalog Servers in Active >Directory? I'll appreciate your help.Regards. You could in the DNS (dnsmgmt.msc) under the _msdcs folder for your AD domain. or nslookup (ls -t SRV ADdomain.com) or look via Sites and Services or use repadmin: (repadmin /showreps YourDC). The result wi...

format a CD
Hi, how can I format a cd+rw re writeable disc aga ...

Getting right date value
I setup my DTPicker control to be used only as a date control, yet I'm noticing that sometimes it will give back a date AND a time all in the same "value" variable. Since it appears that a variable of type "Date" can give back both a date and time, how can I eliminate the time half of a date value??? I might not be able to exactly control the DTPicker control to give me JUST a date, so I'm just curious what to do if it gives me back both a date & time. thank u Hi, Try this : Dim x as date x = cdate(clng(DTPicker1.value)) &qu...

how to format and print labels from an excel file
I have an excel list of people with 12 cells of information. I want to format and print "name tags" (labels?) using only the information in four cells. How can I do this? You can print labels in Excel but formatting can be a problem. Best to use Word for the mailmerge operation and select the 4 labels to print during the setup in Word. For help on Word mail merge using Excel as the data source. http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm http://www.mvps.org/word/FAQs/MailMerge/CreateADataSource.htm And a t...

I need a formula to sum column b if column a is between two dates
I have an excel spreadsheet with employees time off. I need a formula that will add column b if column a is betwee two dates. For example: if column a is between 9/22/04 and 9/21/05 then add column b. I have tried all different formluas but can't get this to work. ...

Remove format link?
Is there a way to remove the format link between fields in Modifier? Help just shows how to set it and the usual stuff doesn't seem to be working. ...

Making a template that puts the current date in the document so that does NOT change
I'd like to make a template that sets up some standard headers and formatting for new Word documents for a night school course I'm enrolled in. Among other requirements for all papers is to put the date the paper was created at the top. I'd furthermore like it so that if I need to reopen the document after creating it to say print another copy, the date written at the top will not change. In other words, when I create a new document using the template the current date is put near the top, but when I subsequently open the file for editing or reprinting it does NOT automat...

Propose a meeting with multiple dates in Outlook
How do you propose a meeting with multiple dates? Recurrence button S wrote: > How do you propose a meeting with multiple dates? > "S" <S@discussions.microsoft.com> wrote in message news:1448A718-D76A-4874-9FC0-03AFD4367566@microsoft.com... > How do you propose a meeting with multiple dates? See this: http://www.slipstick.com/calendar/pickmeeting.htm -- Brian Tillman [MVP-Outlook] On 3/11/2010 7:16 AM, S wrote: > How do you propose a meeting with multiple dates? > A third-party solution called Tungle works nicely for this. ht...