Jump to content
UBot Underground

How to incorporate the current time and date - HELP?


Recommended Posts

Anybody know how I can incorporate the usage of the current time and date within a ubot script in this format: Wednesday, November 17, 2010 11:00 AM

 

Ubot has a system feature for 'date' but it doesn't incorporate time, and the date format the way I need it to be.

 

I couldn't even find a website to scrape this data from, although I'd hate to have to navigate to a site and scrape data just to implement a time and date stamp as shown.

 

Anyway to do this with javascript or something else?

 

The time and date should be current no matter when the bot is run. However I don't mind having the time and date being limited to one time zone, like EST for example. No need to incorporate all time zones, just some way to utilize a date and time stamp as ubot runs, to be utilized as a variable or whatever.

Link to post
Share on other sites

Have you tried using the Shell command? I would execute the date command and redirect the output to a text file

 

date > datetime.txt

time >> datetime.txt

 

Then I would Read it in.

 

The $date node gives it all to you. I would avoid placing that in a ui stat monitor as it will cause you problems.

 

You can use Javascript or you can use the Text commands and strip out what you need as an alternative path.

Link to post
Share on other sites

Can you go into a bit more detail as to how to do that?

 

I understand the concept you're saying, but I don't know how to do it, no idea at all really.

 

And you said the $date node gives everything, it doesn't. It gives me 1/24/10 16:35:30 format.

 

I need the format to be exactly as I showed above. Except the year part can be two or four characters.

Link to post
Share on other sites

How do I make Ubot utilize return values generated by the javascript?

 

From my understanding, javascript returns numerical values, example 1-7 for day of the week. So how do I tell ubot for example, that if the javascript returns value 1, to set variable to 'sunday'.

 

?

Link to post
Share on other sites

Study this bot I threw together.

 

The txt file you will need to change the filename to datetime.cmd for it to work. Make sure the cmd file is in the same folder where you save the bot.

 

Thanks for that, helped a bit. Especially the subtext command, I didn't know about that, easily using only pieces of the $date results.

 

What about the day of the week part? For the most part, I could probably pull apart what I need from the existing $date command, except for the day of the week.

 

PS - Only the first script works in the example bot. I changed the filename as you said and put it in the same folder as the bot and I'm getting an error in the third node 'add to list' in the 2nd and 3rd scripts.

Link to post
Share on other sites

Study this bot I threw together.

 

The txt file you will need to change the filename to datetime.cmd for it to work. Make sure the cmd file is in the same folder where you save the bot.

 

Anyway you could try and whip up an example bot that can produce the time and date in this format,

Wednesday, November 17, 2010 11:00 AM?

Link to post
Share on other sites

As to the error you are getting. I just got back to my office and my computer just booted up. The script is still running correctly so I am not sure what the problem is on your end.

Link to post
Share on other sites

As to the error you are getting. I just got back to my office and my computer just booted up. The script is still running correctly so I am not sure what the problem is on your end.

 

I can't figure out why I can't run those 2 scripts. What do the 2nd and 3rd scripts accomplish exactly? Maybe that's where the info is that I need. I can't figure out anyway to automatically display the day of week, or pm-am style time. 1:30pm etc.

Link to post
Share on other sites

I'll paypal somebody $20 bucks if they can make me a short ubot script that can generate a time and date in the format I need it in! Seriously this is driving me crazy. Such a simple thing but I'm completely stumped.

Link to post
Share on other sites

I'll paypal somebody $20 bucks if they can make me a short ubot script that can generate a time and date in the format I need it in! Seriously this is driving me crazy.

 

EDIT - offer taken.

Link to post
Share on other sites

i know its probably not the best solution

but you can scrape it from

 

http://www.todaysdate.com/

or

http://www.time.gov/

http://www.time.gov/timezone.cgi?Eastern/d/-5/java

 

i hope this helps

 

i don't know java that well but you might be able to borrow some of the java code on

http://www.todaysdate.com/

Link to post
Share on other sites

OP welched so posting publicly.

 

What do you mean by welched exactly?

 

If you're talking about the fact that someone is already doing this for me, then you must be joking.

 

Thanks though I appreciate the sample.

Link to post
Share on other sites

Welched as in not paying for the work. If you were paying I wouldnt have posted publicly.

 

Your attitude sucks to be honest. Just take the bot and be happy.

 

Your welcome by the way.

 

I said thank you above in case you didn't see that. And FYI BotBuddy sent me a PM and said he would do it for $20 before you did. Therefore, the HONEST guy that I am, I'm going to pay him $20 for it. Make sense?

 

It would make sense to say "hey, is anybody doing this for you yet? If not, I'd like to make this for you."

 

But instead you just whip it up, send me your paypal ID, and post here like a jerk, say i 'welched' that my attitude sucks and all that. You're nuts.

 

Thanks for the bot though.

Link to post
Share on other sites

Your post didnt have "thank you" in it when i made that post. You added it after.

 

You should have posted that someone was doing the work in the thread. Anyway, I am not bothered about the cash, I help people here a lot for free. The manner in which you replied to me was what I didn't like.

 

Anyway, best of luck to you.

Link to post
Share on other sites

Your post didnt have "thank you" in it when i made that post. You added it after.

 

You should have posted that someone was doing the work in the thread. Anyway, I am not bothered about the cash, I help people here a lot for free. The manner in which you replied to me was what I didn't like.

 

Anyway, best of luck to you.

 

Whatever man.

 

Thanks.

Link to post
Share on other sites

you two are funny

 

chop it up as a misunderstanding as that is what is seems to be no need to let it get to you

 

@Guerrilla thanks for the example bot I'm sure it will be useful to a lot of people i downloaded it and added it to my collection just in case i ever need it

 

@addamroy I'm glade to see you are a honest person and stick with the deals you make

most of the time you can find the info you need on the forum if not usely someone will share it for free eventually but $20.00 is pretty cheep for if you need the info right away and to my understand BotBuddy is good so $20.00 to a good uboter is cheep

 

P.S. not trying to offend anyone so please don't take it that way

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...