Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default date field is held as 38932 how do I export as 3rd August 06

I am building up SQL statements using data in a Spreadsheet. I'm doing this
via CONCATENATE. I have a date field that appears to be 3rd August 2006 but
in the concatenate appears as 38932. How do I get it to come through as 3rd
August 2006?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 329
Default date field is held as 38932 how do I export as 3rd August 06

Hi Dave,

Assuming the date is in A1:
=TEXT(A1,"d mmmm yyyy") will return '3 August 2006'
The formula to return the day as an ordinal number is quite a bit more complicated:
=DAY(A1)&CHOOSE(AND(DAY(A1)<11,DAY(A1)<12,DAY(A1 )<13)*MIN(4,MOD(DAY(A1),10))+1,"th","st","nd","rd ","th")&TEXT(A1," mmmm yyyy")

You can include either of these with the balance of your concatenation formula.

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

"Dave D" <Dave wrote in message ...
I am building up SQL statements using data in a Spreadsheet. I'm doing this
via CONCATENATE. I have a date field that appears to be 3rd August 2006 but
in the concatenate appears as 38932. How do I get it to come through as 3rd
August 2006?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default date field is held as 38932 how do I export as 3rd August 06

Thanks a lot

"macropod" wrote:

Hi Dave,

Assuming the date is in A1:
=TEXT(A1,"d mmmm yyyy") will return '3 August 2006'
The formula to return the day as an ordinal number is quite a bit more complicated:
=DAY(A1)&CHOOSE(AND(DAY(A1)<11,DAY(A1)<12,DAY(A1 )<13)*MIN(4,MOD(DAY(A1),10))+1,"th","st","nd","rd ","th")&TEXT(A1," mmmm yyyy")

You can include either of these with the balance of your concatenation formula.

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

"Dave D" <Dave wrote in message ...
I am building up SQL statements using data in a Spreadsheet. I'm doing this
via CONCATENATE. I have a date field that appears to be 3rd August 2006 but
in the concatenate appears as 38932. How do I get it to come through as 3rd
August 2006?


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
need held for auto date calculation for adding years and substract srinivas New Users to Excel 1 October 3rd 08 06:54 PM
New date based on one date field minus minutes in another field [email protected] Excel Discussion (Misc queries) 1 December 25th 07 04:05 PM
export .CSV with field containing double quotes? William DeLeo Excel Discussion (Misc queries) 5 April 5th 06 06:08 PM
export excel data to a field in a pdf. robert burger Excel Programming 0 September 16th 04 07:45 PM
VBA, How to open a file with date like 29 August 2004 Grek[_18_] Excel Programming 2 August 29th 04 08:05 PM


All times are GMT +1. The time now is 04:35 PM.

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"