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

Hi all

I posted a variation on this request a couple of days back, but no-one seems
able (or willing) to solve my problem. Thsi issue is this:

I need to have the option of entering a date into a form either manually, or
from a command button. I then need that date to be transferred to a
worksheet cell. I then need to be able to compare other cells with that date
to determine if the other dates have passed.

I'm currently using a textbox on the form, but this shows the date as
mm/dd/yyyy instead of the required dd/mm/yyyy. The date on the sheet is
fine.
If I use Format(date, "dd/mm/yyyy)) to correctly display the date on the
form, the transferred date is then in text format and can no longer be
compared to on the sheet.

Any ideas how I can get round this?

--
Ian
--


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 303
Default Date format issue

Have a look at <windows< control panel regional and language options.

--
Greetings from New Zealand
Bill K
"Ian" wrote in message
...
Hi all

I posted a variation on this request a couple of days back, but no-one
seems able (or willing) to solve my problem. Thsi issue is this:

I need to have the option of entering a date into a form either manually,
or from a command button. I then need that date to be transferred to a
worksheet cell. I then need to be able to compare other cells with that
date to determine if the other dates have passed.

I'm currently using a textbox on the form, but this shows the date as
mm/dd/yyyy instead of the required dd/mm/yyyy. The date on the sheet is
fine.
If I use Format(date, "dd/mm/yyyy)) to correctly display the date on the
form, the transferred date is then in text format and can no longer be
compared to on the sheet.

Any ideas how I can get round this?

--
Ian
--




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date format issue


using ADO jet oledb driver -with hdr=yes set, when i try to read a excel
sheet containing numeric values in all rows from row1 , the first
numeric row is expected to appear as column header in the grid i try to
display in vb6.0, instead first row data is missing and default F1,F2..
headers are displayed. If I change first row data as text , that row
data is correctly displayed.


--
ramesh_rajamoni
------------------------------------------------------------------------
ramesh_rajamoni's Profile: http://www.excelforum.com/member.php...o&userid=29139
View this thread: http://www.excelforum.com/showthread...hreadid=488492

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date format issue


whenever u use format function of vb it returns a string , in this case
u need to set the format of the excel cell to which u r exporting the
date value.
if u have in a textbox some date value convert it (if necessary) to
date datatype using cdate() in vb and export to a excel cell which is
formatted as date type - use format cells option.

-RR


--
ramesh_rajamoni
------------------------------------------------------------------------
ramesh_rajamoni's Profile: http://www.excelforum.com/member.php...o&userid=29139
View this thread: http://www.excelforum.com/showthread...hreadid=488492

  #5   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default Date format issue

Perfect!

I can leave TextBox1.Value = Format (Date, "dd/mm/yyyy") assigned to the
command button, then Range("E2") = Cdate(TextBox1.Value) is exactly what I
needed to convert the transferred data to date format.

Thank you very much.
--
Ian
--
"ramesh_rajamoni"
<ramesh_rajamoni.1z70un_1133158208.3118@excelfor um-nospam.com wrote in
message news:ramesh_rajamoni.1z70un_1133158208.3118@excelf orum-nospam.com...

whenever u use format function of vb it returns a string , in this case
u need to set the format of the excel cell to which u r exporting the
date value.
if u have in a textbox some date value convert it (if necessary) to
date datatype using cdate() in vb and export to a excel cell which is
formatted as date type - use format cells option.

-RR


--
ramesh_rajamoni
------------------------------------------------------------------------
ramesh_rajamoni's Profile:
http://www.excelforum.com/member.php...o&userid=29139
View this thread: http://www.excelforum.com/showthread...hreadid=488492





  #6   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default Date format issue

Thanks for the suggestion, Bill, but this is not the issue as the date in
the cell appears correctly.

The VBA Date command seems to format as mm/dd/yyyy by default. Although I
can reformat using Format(Date, "dd/mm/yyyy"), the resulting data is then
text which is no use when transferred to my sheet.

--
Ian
--
"Bill Kuunders" wrote in message
...
Have a look at <windows< control panel regional and language options.

--
Greetings from New Zealand
Bill K
"Ian" wrote in message
...
Hi all

I posted a variation on this request a couple of days back, but no-one
seems able (or willing) to solve my problem. Thsi issue is this:

I need to have the option of entering a date into a form either manually,
or from a command button. I then need that date to be transferred to a
worksheet cell. I then need to be able to compare other cells with that
date to determine if the other dates have passed.

I'm currently using a textbox on the form, but this shows the date as
mm/dd/yyyy instead of the required dd/mm/yyyy. The date on the sheet is
fine.
If I use Format(date, "dd/mm/yyyy)) to correctly display the date on the
form, the transferred date is then in text format and can no longer be
compared to on the sheet.

Any ideas how I can get round this?

--
Ian
--






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
Please help....Date Format issue SandyW Excel Discussion (Misc queries) 1 January 7th 09 07:29 PM
date format issue Arjen Excel Discussion (Misc queries) 3 August 22nd 06 02:04 PM
DATE FORMAT issue [email protected] Excel Worksheet Functions 1 February 8th 06 07:52 AM
Date format issue LadyDoe Excel Worksheet Functions 1 November 17th 05 07:54 AM
Date format issue Meme Excel Programming 4 April 6th 04 09:19 PM


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