Date() with a message I can't understand

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Date() with a message I can't understand

Post by husky » 02 Nov 2017 23:05

Hello,


I'm running into some weird issues with

Code: Select all

 Date=(11/03/2017, 14, 00 , 00 , [color=#40FFFF]UTC or"UTC"[/color]);

I expected to get back the UTC date for the date and hour specified.

What I'm getting is :

1. Unsupported method getDate:with 5 arguments.
2. The String timezone at times is not accepted because it cannot be converted into a number.

I also tried to see what happens if I remove "UTC" argument.(keeping only 4 arguments)

I'm still getting the same message 1 above.

Any help is welcome.


Thanks

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Date() with a message I can't understand

Post by Martin » 03 Nov 2017 20:46

Hi,

I assume your code looks like this:

Code: Select all

getDate=(11/03/2017, 14, 00 , 00 , "UTC");
The first parameter specified in this way is just an integer division meaning 11 divided by 3 divided by 2017.
Something like this should work:

Code: Select all

date = getDate("11/03/2017 14:00:00 UTC", "MM/dd/yyyy HH:mm:ss z);
Regards,
Martin

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Date() with a message I can't understand

Post by husky » 04 Nov 2017 13:21

Hello Martin,


You assumed my code correctly.
Code: Select all
getDate=(11/03/2017, 14, 00 , 00 , "UTC");


Well, another lesson learned. I fought this problem really hard and from the Help, there is nothing to tell me that date must be enclosed between ".
probably a seasoned programmer would not fall into the same pit I did.

Fixed the getDate and now it works as expected. (kind of obvious after all).

Thank You very much

Best Regards

Peter
"Basic research is what I'm doing when I don't know what I'm doing"

Post Reply