Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto date entry in Excel - how?

Status
Not open for further replies.

Chris121

Technical User
Aug 18, 2003
34
0
0
GB
Hi
At work we have a uniix database but I access it with Multiview Software on my desktop PC.
In the unix database, it has this really handy feature for filling in date fields quickly. You just enter the date, hit return and you get a dd/mm/yy in the field which autofills /current month/current year.
My question is, how can I get Excel to do this? If I try it on a date formatted cell, it does the autofil, but with the year 1900. I thought this was some strange millenium issue, but even with Excel 2002 at home - same thing happens.
Anyone shed any light?

Christine.
 
Christine,

You have to understand how dates work in excel -- which is probably much different than unix.

A date is a NUMBER like today is 38026 and the exact date AND time is 38026.56155.

Excel converts a string that looks like "mm/dd/yyyy" (or however your regional settings are configures) to a number like 38026. Then you FORMAT that numeric value as a date.

For instance, I could format 38026.56155 any number of ways like...

"ddd mmmm dd, yyyy hh:mm" which would be Mon February 09, 2004 13:28

or

"mmm dddd dd" Feb Monday 09

It just a matter of formatting.

So how do you enter Unix dates so handily?

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Thanks Skip
I expect it's part of the software - a database called FCL. It must be written into the coding to handle dates that way. Surely a funcion or macro could make excel do it?
Christine.
 
If you enter dd/mm in the cell, excel will assume the current year for you when it displays the date.
Anything more than this default behaviour will require a macro.
A macro like this could be done, but it seems to be overkill when all you need to do is enter the additional month.


Kieran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top