How to change the date format yyyy/mm/dd to dd/mm/yyyy??? - Programmers Heaven

Howdy, Stranger!

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

Categories

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.