#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Date conversions

OS: MS XP
EXCEL: 2000

The only value in the database that represents a date is a number in the
format 20070107. This would be 01/01/07.

So:
20070130 = 01/30/2007
20070131 = 01/31/2007
20070201 = 02/01/2007

I need to link into this table using the Function VLookUp.
20070107, 17
20070108, 23
20070109, 15

The values returned would be 12, 23 and 15.

The dates are changing all the time and I use the Now() function to get the
date. I dont want to use a look-up table to cross-reference the date.

So how to I convert the Value returned by the Now() function into what I need.

Example:
Date Now() I need
01/30/2007 39112 20070130
01/31/2007 39113 20070131
02/01/2007 39114 20070201

How do I convert the value returned by Now() into what I need without a
cross refferance table? Ex: 39113 into 20070201.

Thanks in advance.

--
Richard
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Date conversions

Hi Richard,

With TODAY() in A1:

=YEAR(A1)&MONTH(A1)&DAY(A1)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Richard" wrote in message ...
| OS: MS XP
| EXCEL: 2000
|
| The only value in the database that represents a date is a number in the
| format 20070107. This would be 01/01/07.
|
| So:
| 20070130 = 01/30/2007
| 20070131 = 01/31/2007
| 20070201 = 02/01/2007
|
| I need to link into this table using the Function VLookUp.
| 20070107, 17
| 20070108, 23
| 20070109, 15
|
| The values returned would be 12, 23 and 15.
|
| The dates are changing all the time and I use the Now() function to get the
| date. I don't want to use a look-up table to cross-reference the date.
|
| So how to I convert the Value returned by the Now() function into what I need.
|
| Example:
| Date Now() I need
| 01/30/2007 39112 20070130
| 01/31/2007 39113 20070131
| 02/01/2007 39114 20070201
|
| How do I convert the value returned by Now() into what I need without a
| cross refferance table? Ex: 39113 into 20070201.
|
| Thanks in advance.
|
| --
| Richard


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Date conversions

=TEXT(NOW(),"yyyymmdd") will convert the result into a text representation in
the form you described. If your table has numbers rather than text, use
=VALUE(TEXT(NOW(),"yyyymmdd"))

"Richard" wrote:

OS: MS XP
EXCEL: 2000

The only value in the database that represents a date is a number in the
format 20070107. This would be 01/01/07.

So:
20070130 = 01/30/2007
20070131 = 01/31/2007
20070201 = 02/01/2007

I need to link into this table using the Function VLookUp.
20070107, 17
20070108, 23
20070109, 15

The values returned would be 12, 23 and 15.

The dates are changing all the time and I use the Now() function to get the
date. I dont want to use a look-up table to cross-reference the date.

So how to I convert the Value returned by the Now() function into what I need.

Example:
Date Now() I need
01/30/2007 39112 20070130
01/31/2007 39113 20070131
02/01/2007 39114 20070201

How do I convert the value returned by Now() into what I need without a
cross refferance table? Ex: 39113 into 20070201.

Thanks in advance.

--
Richard

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Date conversions

Hi,

Not sure if this will but if all your data is in the form are dates then you
don't need to convert anything, excel will lookup the dates in any format.

example:
A1= 01/01/2007
B1= hello
A2= 01/01/2007
A3= 39083

if you use a vlookup on A2 and A3 on the range A1:B1 , you should get the
same result "hello".


HTH
Jean-Guy

"bpeltzer" wrote:

=TEXT(NOW(),"yyyymmdd") will convert the result into a text representation in
the form you described. If your table has numbers rather than text, use
=VALUE(TEXT(NOW(),"yyyymmdd"))

"Richard" wrote:

OS: MS XP
EXCEL: 2000

The only value in the database that represents a date is a number in the
format 20070107. This would be 01/01/07.

So:
20070130 = 01/30/2007
20070131 = 01/31/2007
20070201 = 02/01/2007

I need to link into this table using the Function VLookUp.
20070107, 17
20070108, 23
20070109, 15

The values returned would be 12, 23 and 15.

The dates are changing all the time and I use the Now() function to get the
date. I dont want to use a look-up table to cross-reference the date.

So how to I convert the Value returned by the Now() function into what I need.

Example:
Date Now() I need
01/30/2007 39112 20070130
01/31/2007 39113 20070131
02/01/2007 39114 20070201

How do I convert the value returned by Now() into what I need without a
cross refferance table? Ex: 39113 into 20070201.

Thanks in advance.

--
Richard

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Date conversions

=DATE(YEAR(A1),MONTH(A1),DAY(A1))

Format cell as: yyyymmdd


"Richard" wrote:

OS: MS XP
EXCEL: 2000

The only value in the database that represents a date is a number in the
format 20070107. This would be 01/01/07.

So:
20070130 = 01/30/2007
20070131 = 01/31/2007
20070201 = 02/01/2007

I need to link into this table using the Function VLookUp.
20070107, 17
20070108, 23
20070109, 15

The values returned would be 12, 23 and 15.

The dates are changing all the time and I use the Now() function to get the
date. I dont want to use a look-up table to cross-reference the date.

So how to I convert the Value returned by the Now() function into what I need.

Example:
Date Now() I need
01/30/2007 39112 20070130
01/31/2007 39113 20070131
02/01/2007 39114 20070201

How do I convert the value returned by Now() into what I need without a
cross refferance table? Ex: 39113 into 20070201.

Thanks in advance.

--
Richard



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default Date conversions

Do you need to bother with =DATE(YEAR(A1),MONTH(A1),DAY(A1)) ?
Doesn't that get you back where you started from?
Won't =A1 do the same, if you format the cell as you've suggested?
--
David Biddulph

"Teethless mama" wrote in message
...
=DATE(YEAR(A1),MONTH(A1),DAY(A1))

Format cell as: yyyymmdd


"Richard" wrote:

OS: MS XP
EXCEL: 2000

The only value in the database that represents a date is a number in the
format 20070107. This would be 01/01/07.

So:
20070130 = 01/30/2007
20070131 = 01/31/2007
20070201 = 02/01/2007

I need to link into this table using the Function VLookUp.
20070107, 17
20070108, 23
20070109, 15

The values returned would be 12, 23 and 15.

The dates are changing all the time and I use the Now() function to get
the
date. I don't want to use a look-up table to cross-reference the date.

So how to I convert the Value returned by the Now() function into what I
need.

Example:
Date Now() I need
01/30/2007 39112 20070130
01/31/2007 39113 20070131
02/01/2007 39114 20070201

How do I convert the value returned by Now() into what I need without a
cross refferance table? Ex: 39113 into 20070201.

Thanks in advance.

--
Richard



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
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Date format issue CindyLF1 New Users to Excel 3 June 12th 06 06:18 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM
Date Conversions from UTC to EST Kosher Kitten Excel Worksheet Functions 1 March 1st 05 05:10 PM


All times are GMT +1. The time now is 02:43 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"