Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Date format.

Hi All

Here is my problem.

I have a tracker in which some users update dates in a column. Column
A has the user names and Column B has the dates updated by the users.
I have updated the actual dates in Column C

Users Date Updated Actual Dates
User1 3/9/10 Actual date is 03-Sep-10
User2 03/09/10 Actual date is 03-Sep-10
User3 03/09/2010 Actual date is 03-Sep-10
User4 9/3/10 Actual date is 03-Sep-10
User5 09/03/10 Actual date is 03-Sep-10
User6 09/03/2010 Actual date is 03-Sep-10
User7 09.03.10 Actual date is 03-Sep-10
User8 03-09-10 Actual date is 03-Sep-10
User9 09-03-10 Actual date is 03-Sep-10
User10 03-Sep-2010 Actual date is 03-Sep-10
User11 03-09-2010 Actual date is 03-Sep-10


I want to make sure that the date is update in dd-mmm-yy format
only.
I used the below codes but I am not getting the desired results it is
converting months into days and days into month.

ActiveCell.Offset(0, 4).NumberFormat = "[$-409]dd-mmm-yy;@"
ActiveCell.Offset(0, 4).Value = Format(ActiveCell.Offset(0, 4).Value,
"dd-mmm-yy")

I want to be sure that the date updated in the cell is getting
displayed is in dd-mmm-yy format. I want the macro to make sure the
date is updated in the dd-mmm-yy format only.
It will be greate if an message pop-ups if the format is incorrect.

Please help........................

Regards
Heera Chavan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Date format.

On Wed, 13 Oct 2010 07:00:16 -0700 (PDT), Heera
wrote:

Hi All

Here is my problem.

I have a tracker in which some users update dates in a column. Column
A has the user names and Column B has the dates updated by the users.
I have updated the actual dates in Column C

Users Date Updated Actual Dates
User1 3/9/10 Actual date is 03-Sep-10
User2 03/09/10 Actual date is 03-Sep-10
User3 03/09/2010 Actual date is 03-Sep-10
User4 9/3/10 Actual date is 03-Sep-10
User5 09/03/10 Actual date is 03-Sep-10
User6 09/03/2010 Actual date is 03-Sep-10
User7 09.03.10 Actual date is 03-Sep-10
User8 03-09-10 Actual date is 03-Sep-10
User9 09-03-10 Actual date is 03-Sep-10
User10 03-Sep-2010 Actual date is 03-Sep-10
User11 03-09-2010 Actual date is 03-Sep-10


I want to make sure that the date is update in dd-mmm-yy format
only.
I used the below codes but I am not getting the desired results it is
converting months into days and days into month.

ActiveCell.Offset(0, 4).NumberFormat = "[$-409]dd-mmm-yy;@"
ActiveCell.Offset(0, 4).Value = Format(ActiveCell.Offset(0, 4).Value,
"dd-mmm-yy")

I want to be sure that the date updated in the cell is getting
displayed is in dd-mmm-yy format. I want the macro to make sure the
date is updated in the dd-mmm-yy format only.
It will be greate if an message pop-ups if the format is incorrect.

Please help........................

Regards
Heera Chavan


Conceptually, I think if you want to be absolutely sure that your
users will enter dates in a DMY format, you will have to have them
enter the date and month and year separately.

There is no way that Excel can tell, for example, if the user enters
9/3/10 if he means 3 Sep 2010 or 9 Mar 2010.

The entry is ambiguous and Excel will interpret it according to the
Windows Regional Settings.

An alternative to requiring separate entry of day, month, year would
be to display the interpreted date for user evaluation prior to
storing it. In my opinion, this would be less "bullet-proof".
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Date format.

Thank you Ron.

Really appriciate your comment.
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
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
change date format dd/mm/yyyy to Julian date format? itzy bitzy Excel Worksheet Functions 1 December 8th 09 07:42 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier[_2_] Excel Programming 0 September 22nd 04 03:26 PM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


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