close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Help desperately required re: date formatting

Thread began 5/01/2009 9:45 am by russell298997 | Last modified 6/22/2009 6:30 am by Ray Borduin | 8349 views | 15 replies |

russell298997

Help desperately required re: date formatting

Can anyone shed any light here before I abandon DataAssist.......

Pretty well every time i insert records using DataAssist it has been impossible to force a UK date format - either using <%Session.LCID=2057%> or switch function code recommended by WebAssist.

WebAssist support now concede that DataAssist can't insert the date in UK format (tho it has been known to do it correctly on some insert page, for some even more baffling reason) and say there is a bug and it may get fixed at some point in the future, but that's obviously not helping me now, knee deep in a project.

I have tried re-building a basic Dreamweaver Insert page and the date inserts fine. However I also need to use Dig File Pro to upload files WA engineer thought that should be fine) . Having added that, and changed all the "Request.Form" instances to "UploadFormRequest", I am left with the page falling over at the line using "If (CStr(UploadFormRequest("MM_insert")) = "form1") Then".

It brings up the same "can't call binary read" error message. If I change that instance of "Request" to "UploadFormRequest", I get an type mismatch error.


Can anyone shed any light on a way forward? I really have to be able to input dates in consistent UK format and be able to upload files from the same page. I'm not good enough write it all without extensions

Am I asking the technically impossible or does anyone know what needs to be changed in this code that's hanging. Or how to actually ensure a UK date format adhered to....

Would be very grateful for any suggestions.

Attached Files
Events_Insert2.zip
Sign in to reply to this post

Ray BorduinWebAssist

Validation Toolkit will reformat a date for you. What database type are you using? mySQL for instance only accepts Y-M-D H:M:S format.

Anybody from any region needs to use this format, not just UK, but US as well.

There are many functions and techniques for reformatting dates, but the right technique depends on your server language and database type.

Sign in to reply to this post
Did this help? Tips are appreciated...

russell298997

Hi,

I'm using ASP and Access dBase, do you think Validation toolkit could do it?

Sign in to reply to this post

Ray BorduinWebAssist

I'm pretty sure it could with client side validation and reformatting options. I'm not sure what format dBase expects, but you could probably look that up and make sure validation toolkit updates the date to the correct format.

Sign in to reply to this post
Did this help? Tips are appreciated...

russell298997

thanks, that could be a life-saver. any pointers on how i would start applying the behaviour to change the date format around? i can see how the validator might flag up a date as being non-UK format but where/how would you instruct it to apply some change?

thanks for any assistance ray.

Sign in to reply to this post

Ray BorduinWebAssist

Highlight the form and go to the Behaviors window in DW. Then apply the date validation behavior. It will ask the date format to use and you can set it in that interface. You can ignore the rest of the settings since all you care about is the date formatting.

Sign in to reply to this post
Did this help? Tips are appreciated...

russell298997

ok. thanks

when i do there are two boxes - first one says "allow", second one says "reformat" - on the basis that i want people to input the date in dd/mm/yyyy format and the validator has to stop this being input as mm/dd/yyyy, what would you recommend i select as the settings for the two areas above?

Sign in to reply to this post

Ray BorduinWebAssist

Well in some cases it isn't possible, since who knows what format 11/09/2009 is in after all, but I'd probably just do it onBlur instead of onSubmit. So instead of highlighting the form, highlight the form element itself and use the onblur even.

Set both start and end date formats to: dd/mm/yyyy

See if that works for you.

Sign in to reply to this post
Did this help? Tips are appreciated...

russell298997

no, doesnt work (file attached) . i still get 02/07/2009 reversed to 07/02/2009. the other oddity is the subsequent email generated by universal mail with the vent info does show the date as correct tho.

any other bright ideas/hackrounds/thoughts..? other than that i have to abandon DataAssist which is a massive pity cos it helped me so much.

Attached Files
Events_Insert.zip
Sign in to reply to this post

russell298997

by the way, i quite take your point that "who knows what 02/11/2009 is" - i just dont want it automatically reversed - if you understand!

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...