473,466 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to display date in excel via Export from Javascript based on Regional Settings?

2 New Member
Hi,
I am using Javascript for Excel Export from classic ASP.
In my excel i have many Date columns that i need to store based on the regional settings.
The application also allow us to set the dates in a format but this should be overridden with the regional Settings for the date.
I have used toLocaleString() to convert the dates but for dd/mm/yyyy if i have some dates like 04/12/2010 its converting that to 12/4/2010 not happening for all but especially for this. Could anyone please provide me the code that will convert the date to regional settings regardless of how they are coming from the application?
Thanks...
Dec 21 '10 #1
3 2644
acoder
16,027 Recognized Expert Moderator MVP
I think you have to set the NumberFormat property to the required format. Does that work?
Dec 21 '10 #2
Abdul Qadir
2 New Member
Hi Mate,
Actually i need to set the NumberFormat property to the regional settings i am choosing.
How can i get the regional setting Format for the date so that i can feed that to the number format property so that the application always takes that format and put the dates properly in Excel?
If you could share the code for getting the regional date and the same could be used for the NumberFormat property i guess that will help.
Please let me know your inputs.
Thanks...
Best Regards
AB
Dec 22 '10 #3
acoder
16,027 Recognized Expert Moderator MVP
Try the Application.International property.
Dec 23 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Laurence Neville | last post by:
This is regarding a change in the Short Date format under Hebrew Regional Settings, that has caused huge problems in our ASP web application. The change appears to have been introduced sometime...
4
by: Jonathan | last post by:
Dear All, I am trying to set a webserver to use French regional settings for testing ASP pages. According to http://support.microsoft.com/kb/q306044, for IIS5, this is a matter of changing...
2
by: isaacrajan | last post by:
Hello, Is there a way in which users can be prevented from making changes to regional settings in Win XP Professional edition so that the interpretation of dates by an Access application remains...
3
by: Karunakararao | last post by:
Hi All, How can i get the date based on Regional settings . how can i get the date format using C# .NET " The date displayed in the date/time field should be formatted according to the...
12
by: magister | last post by:
Hello, I know I can set the Culture to what I want, but shouldn't the current culture be taken from the regional settings on the web server's control panel!!! Mine is set to "united kingdom"...
2
by: Andy Pickering | last post by:
I made the mistake of leaving the regional settings as US (I'm based in the UK) when I installed my development server (2003 Std). I've set the regional settings back to English (UK) in all of the...
7
by: Fred Flintstone | last post by:
I'm writing a VB.Net windows forms application. This line of code: Personal.EffectiveDate = GridRow2.Cells("New Value").Value.ToString.Trim Fails with this error: Cast from string...
16
by: Colmag | last post by:
I've written an application with vb.net 2003 (framework 1.1) which automates a 3rd party viewing/printing application (via an activex control). I've released several versions over the last year...
6
by: Janette | last post by:
Hi, I have done a lot of reading before doing this posting, but I just can't find a solution that makes sense. eg http://support.microsoft.com/default.aspx/kb/306044 - Behavior of Date/Time...
0
by: SharmaPunit | last post by:
I want to display a date in m/d/yy format. I have written the following lines of code and it is running perfectly till the date format in the regional settings of my computer is set to mm/dd/yyyy or...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.