Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to change the date format yyyy/mm/dd to dd/mm/yyyy???

My system date format is yyyy/mm/dd. I tried to retrieve the values of day, month and year using the simple function like this:

dim d, m, y

d = day(Date)
m = month(Date)
y = year(Date)

but it returns an error when I run it.
is it because the Date format is not dd/mm/yyyy but yyyy/mm/dd?
if thats the case, are there any other ways for me to do that?

thanks

Comments

  • ManningManning Posts: 1,621Member
    : My system date format is yyyy/mm/dd. I tried to retrieve the values of day, month and year using the simple function like this:
    :
    : dim d, m, y
    :
    : d = day(Date)
    : m = month(Date)
    : y = year(Date)
    :
    : but it returns an error when I run it.
    : is it because the Date format is not dd/mm/yyyy but yyyy/mm/dd?
    : if thats the case, are there any other ways for me to do that?


    As far as I know it should be independant of the system date format. What error are you getting? That may help determine what the cause is.
  • lillulillu Posts: 308Member
    This might be:

    http://www.adopenstatic.com/faq/systemdateformat.asp

    : : My system date format is yyyy/mm/dd. I tried to retrieve the values of day, month and year using the simple function like this:
    : :
    : : dim d, m, y
    : :
    : : d = day(Date)
    : : m = month(Date)
    : : y = year(Date)
    : :
    : : but it returns an error when I run it.
    : : is it because the Date format is not dd/mm/yyyy but yyyy/mm/dd?
    : : if thats the case, are there any other ways for me to do that?
    :
    :
    : As far as I know it should be independant of the system date format. What error are you getting? That may help determine what the cause is.
    :

    [hr][grey]To err is human, but to really foul things up requires a computer. (Farmers Almanac)[/grey] :-)

Sign In or Register to comment.