Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default convert american dates from a query

Hi,

I checked past post about date conversions but couldn't find any that
fix my problem:

- I am doing a query that returns dates (text strings) in the format 1
Dec 2005, and I need to convert them to the user short date format.

Problem is that the xl of those users does not understand "Dec". As
there are "built in" functions that only works in the American format I
was expecting this was going to be an easy one... but so far no
success. Ideas

Mika

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default convert american dates from a query

What dates are recognized by the local Excel settings? I would guess that
the big obstacle would be the month names/abbreviations. Perhaps you need to
convert them to strings, then use a lookup table to replace the month names
with the localized equivalents, then do the conversion using the DATEVALUE
function. Just a thought as I have no way to test it.
--
- K Dales


"Mika" wrote:

Hi,

I checked past post about date conversions but couldn't find any that
fix my problem:

- I am doing a query that returns dates (text strings) in the format 1
Dec 2005, and I need to convert them to the user short date format.

Problem is that the xl of those users does not understand "Dec". As
there are "built in" functions that only works in the American format I
was expecting this was going to be an easy one... but so far no
success. Ideas

Mika


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default convert american dates from a query

Sorrowfully I think you are right Dales. I think that is what I should
do. I was trying to avoid it, in case such a function was already
developed. It is amazing that different Excel language versions can not
understand each other. The minimum I would expect is that any version
has functions, like val(...), that always/only work with english and
then, trough format, could give outputs in the local language,
something like:

Mylocal_date=Format(ValFunction("3 Dec 2005"),"short date")

Mika

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Convert European Date format to American Format Albert Excel Discussion (Misc queries) 3 August 21st 07 10:02 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
How do I convert spreadsheet from Canadian $ to American $? CLR Excel Discussion (Misc queries) 2 May 1st 05 08:13 PM
English and American dates... Nick Excel Programming 2 July 27th 04 01:19 AM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"