Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:44:20+00:00 2026-06-11T02:44:20+00:00

I have a spreadsheet I created mid-August which has a table with one column

  • 0

I have a spreadsheet I created mid-August which has a table with one column for every day since then. The column header is the day’s date. The date is displayed how I want it to be displayed: “dd/mm/yyyy”

However, I have macro which needs to read these dates in order to perform its work. Because I am using a table, the dates seem to be held as text rather than as 5-digit numbers (when I set the header cells’ format to “General”, it remains with the “dd/mm/yyyy” format rather than changing to a 5-digit number. This wasn’t a problem until the 1st of September, after which CDate (in the macro) began reading these dates as “mm/dd/yyyy”

Is there any way to make CDate recognise the Australian date format rather than the American? Or failing that, make the table headers stay as dates rather than as text? I’d rather avoid having to convert the Table back to a range, as the macro is designed to use table attributes, ListColumns etc.

UPDATE:

I’ve narrowed down the problem. It isn’t the date, but the ListColumn.Name property. For some reason it is re-converting my date. I’m using Format() to set the date format, like so:

CreateHistoryColumn.Name = Format(headerDate, "dd/mm/yyyy")

MsgBox Day(headerDate) & "/" & Month(headerDate) & "/" & Year(headerDate)
MsgBox Format(headerDate, "dd/mm/yyyy")
MsgBox CreateHistoryColumn.Name

Where CreateHistoryCol is an object of class ListColumn. The 3 MsgBox calls display the following:

6/9/2012
06/09/2012
9/06/2012

So the Format() call formats the date correctly, but the call to ListColumn.Name serves to alter the format to “mm/dd/yyyy”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:44:21+00:00Added an answer on June 11, 2026 at 2:44 am

    As I showed in the update, the ListColumn.Name method was responsible for the unwanted conversion. I still don’t know why, but there is any easy fix:

    CreateHistoryColumn.Name = CLng(headerDate)
    

    This forces the header to be treated as a number, and therefore it can be recognised as its proper date. I can’t explain it any further than that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a spreadsheet with multiple columns, one of which is an owner_id column.
I have created a table on my application same following code <table class=spreadsheet> <tr>
I have an excel spreadsheet that has dates in the first column, the rest
I have created a custom pipeline component which transforms a complex excel spreadsheet to
I created a GPA spreadsheet in excel and have the basics working but I
I have a user that created about 50 sheets inside a Google Spreadsheet. Each
I have created a library with a project name of GAS, in a spreadsheet
I have a spreadsheet that I am sorting based on an item number column.
I have created a macro enabled Excel Spreadsheet that will programmatically load a image
I have a Excel spreadsheet of requirements created from ReqPro that I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.