Results 1 to 3 of 3

Thread: how to change excel column cells format to "Date" time in runtime.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    malaysia
    Posts
    89

    Resolved how to change excel column cells format to "Date" time in runtime.

    Hi guys,
    i am facing a problem here.
    i have a microsoft access program, which will import excel spreadsheet data into database.

    however, before i import the spreadsheet, i need to change a column cells format.
    i.e i have a worksheet, let assume, WS1
    in WS1, the first column, Column A cells format is "Custom"
    i want to change it to "Date" format,
    how can i do that?
    please advice.
    Last edited by kkc; Oct 10th, 2005 at 05:25 AM. Reason: resolved

  2. #2
    Lively Member
    Join Date
    Aug 2005
    Posts
    77

    Re: how to change excel column cells format to "Date" time in runtime.

    Try this:
    VB Code:
    1. WS1.ActiveSheet.Range("A:A").NumberFormat = "dd/mm/yy hh:MM:ss;@"

    Pieter

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    malaysia
    Posts
    89

    Resolved Re: how to change excel column cells format to "Date" time in runtime.

    thanx,
    it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width