navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Date and time formats

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> Date and time formats
Page: [1]
 
OscarSierra

 

Posts: 179
Joined: 5/14/2004
From: Norway
Status: offline

 
Date and time formats - 8/2/2006 8:44:44   
During a search for some datetime problems (drives me crazy sometimes....), I found this: http://psacake.com/web/ef.asp

Maybe you all know them, but for me it was a very useful page!

- Oystein
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Date and time formats - 8/2/2006 9:37:10   
Lots of handy lil' ASP functions there. Thanks.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to OscarSierra)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Date and time formats - 8/2/2006 14:10:25   
Great. You got just about everything here... :)

Except.... A new question:

Does anyone know how to create a working timer, or have a timer script - that I can install on my website, so then I can call asp/vb scripts dependant on what time of day it is???

LLLune :)

_____________________________


(in reply to OscarSierra)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Date and time formats - 8/2/2006 15:33:43   
quote:

call asp/vb scripts dependant on what time of day it is


That would be done at runtime. What specifically did you have in mind?

I have done a JavaScript timer that was seeded by the server clock and set to disable/enable a form submission based on what time it was on the server. I'll have to search deep 'cause it isn't where I keep my current stuff apparently.:)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Long Island Lune)
davids

 

Posts: 211
Joined: 1/26/2003
From: Belgium (American)
Status: offline

 
RE: Date and time formats - 8/2/2006 17:48:04   
LLLune,

This is tricky, because with ASP there is no real process running for your app - it only responds to requests. Also, if no one uses your site for a while the application itself stops to conserve server resources. So, even if you could set a timer, it would only work if someone was using your application.

We needed to generate new reminders every Sunday for incomplete items from the week before. Here's how we solved it. First we created a file "timecheck" in the data folder so it has write permissions. This is just a text file with the datetime string.

Then we created a function included in the site home page that checks the timecheck file. If the date is within the last 7 days do nothing, else run the code that generates the reminders and update the timecheck file.

With some variation this idea could be used to check for elapsed time over any period or only for certain types of users, etc.

_____________________________

Davids
International Relocation Technology

(in reply to Long Island Lune)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Date and time formats - 8/2/2006 18:39:13   
rdouglass,

Yeah this script/function needs to run in real-time.

Specifically it needs to be a general script, was thinking cgi or something, that reads the time once every minute or so, then if the time matches a predetermined time, activate a script and carries out a task.

We have distributors that like to email things they find on our site to a private list of their own clients. So they find an item on our site, they program it for a certian date and time. And on that date and time, the item gets emailed out to the distributor' clients. Right now I got a guy who has to sit by the computer and check the times that people programmed in. If the current time matches the programmed time, he manually sends out the item by email. We have all the systems in place to find a product, set it up to transmit, program the system, etc. We just need something that can read the current time, compare it to the time they programmed, then when the two are equal, the script starts and the transmitting goes into motion. One of our main competitions already has this system setup and are using it great - http://www.constantcontact.com/index.jsp. Was hoping we could do the same. But it's this timer thing that we can't figure out.

davids,
Very interesting. Thanks for laying that out for me. This is something I want my guys to see. Yeah, .asp can't accomplish a task like this. Neither can VB. We went through every function in vb and can't fnd anything in real time. Someone else told me cgi. Don't know that though.

The script itself does not have to be asp or vb, but (I guess) as long as it can return a string to the current date and time - that can be read by one of our scrpts, we might be on our way to solving this.

The technology is out there, like I said, someone else got it and it works great for them. Of course, they aren't going to tell me how it was done. I guess an industry secret. In fact, there's about 10 sites that I know of that do the exact same thing we're trying to do.

_____________________________


(in reply to davids)
davids

 

Posts: 211
Joined: 1/26/2003
From: Belgium (American)
Status: offline

 
RE: Date and time formats - 8/3/2006 4:08:01   
Ah, well then I think you will need to work outside IIS, creating an independent process that would run on the server under windows/linux that would use the same database to check and send email.

This means you would need a dedicated server - cheaper probably than having a guy doing this manually.

I'm not the tech brains around here, but that's my take on it.

_____________________________

Davids
International Relocation Technology

(in reply to Long Island Lune)
OscarSierra

 

Posts: 179
Joined: 5/14/2004
From: Norway
Status: offline

 
RE: Date and time formats - 8/3/2006 10:06:55   
Maybe I'm not following you, but why not use a batch file to kick the process alive ? you can make it start running whenever and as many times as you want with a scheduled task on the server........ I use that frequently to a lot of things

- Oystein

(in reply to davids)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Date and time formats - 8/3/2006 10:48:30   
This thread is not for questions but discussion regarding the tools and techniques. For questions, could you please create a new thread?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to OscarSierra)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Date and time formats - 8/3/2006 15:34:38   
rdouglass,

Yeah your right. Sorry about that. I forgot... :) :) :)

To create a new post I'd like to include everything that was stated in this one from my first question on down. But I don't think I could do that?

Since your a moderator could you do that for me? This way it could continue on? With a post title of "Looking for a real-time date/time caculator script". Would hate to start it all over again from scratch. Is this possible?

I won't reply to davids or OscarSierra here to stop this post from continuing on.

_____________________________


(in reply to rdouglass)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Date and time formats - 8/3/2006 15:36:49   
I can't actually copy a thread. I can move a thread, lock a thread, or delete a thread.

You can always refer to this post with a link and a few copied quotes. IMO that would be easiest.

Good to see you back. Haven't seen you around much lately...:)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Long Island Lune)
Reflect

 

Posts: 4769
From: USA
Status: offline

 
RE: Date and time formats - 8/3/2006 15:39:24   
Cron job???

Take care,

Brian

_____________________________


(in reply to rdouglass)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Date and time formats - 8/3/2006 15:47:26   
Hi rdouglass,

Okay, that sounds like a good idea. I'll post/create elsewhere and link to this. Thanks for the good info. Great to be back, it's been a long time... :)

reflect, :)

_____________________________


(in reply to Reflect)
Long Island Lune

 

Posts: 2340
Joined: 6/8/2002
From: New York
Status: offline

 
RE: Date and time formats - 8/4/2006 16:27:04   
LLLuneeeee queston continued here: http://www.frontpagewebmaster.com/m-336223/tm.htm#336226

_____________________________


(in reply to Long Island Lune)
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
RE: Date and time formats - 8/4/2006 17:51:48   
Another datetime hint. If you're vexed about UK dates in the database being stored in US format and you have to convert it all the time then use the longer date formats to enter into the database

Instead of 4/8/06 or 8/4/06 use 8 Aug 2006 or Aug 8 06 and you'll never have a problem again.

_____________________________

it is natural for people not to see one's own faults, and to exaggerate other people's faults and failings.
Currently listening to: L'Enfer Des Formes by Stereolab

(in reply to Long Island Lune)
Shona Smith

 

Posts: 24
Joined: 4/19/2005
Status: offline

 
RE: Date and time formats - 8/7/2006 5:10:16   
Hi

Thanks for you help but it is the information in the database I want to be stored in GB format in the Timestamp.

Even if I change in the database to Long Date format it submits it as 8th July instead of 7th August.

Any ideas?

Cheers Shona

(in reply to yb2)
davids

 

Posts: 211
Joined: 1/26/2003
From: Belgium (American)
Status: offline

 
RE: Date and time formats - 8/7/2006 5:20:48   
Hi Shona,

In fact, the date is not stored in the database in any format - even US or European. It is simply a number, like 1025.45. To the left of the decimal are days (after a certain date, which depends on the database), while to the right are parts of a day. You can look more up about that.

What does it mean? When you look at the date in your database, it shows it formatted according to the database settings or your regional settings. That is what you would need to change to see it presented differently.

_____________________________

Davids
International Relocation Technology

(in reply to Shona Smith)
Shona Smith

 

Posts: 24
Joined: 4/19/2005
Status: offline

 
RE: Date and time formats - 8/7/2006 5:47:07   
Hi

I looked at this before my regional settings are set to English (United Kingdom) so I don't really know why it still insists on submitting as mm/dd/yy.

Cheers

(in reply to davids)
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
RE: Date and time formats - 8/7/2006 6:29:19   
this might help
http://www.4guysfromrolla.com/webtech/041001-1.shtml

the dates are stored as numbers (as is everything) but converted by MS databases into US format, which is equivalent to what I said but not the same! :) I should be more precise or someone on here will always catch me out! :D


btw, you don't change the database format to Long Date, you change your web pages format to Long Date style. If your database is in long but your web pages are using 7/8/06 then that will be interpretted as 7th August. You need to use 8th July 06 from the webpage.

_____________________________

it is natural for people not to see one's own faults, and to exaggerate other people's faults and failings.
Currently listening to: L'Enfer Des Formes by Stereolab

(in reply to Shona Smith)
Shona Smith

 

Posts: 24
Joined: 4/19/2005
Status: offline

 
RE: Date and time formats - 8/7/2006 7:37:23   
Hi

Thanks for this that is absolutely spot on.

You are a star

Cheers Shona

(in reply to yb2)
Page:   [1]

All Forums >> Community >> OutFront Discoveries >> Date and time formats
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts