NetTalk Central

Author Topic: Wrong date parsing  (Read 3339 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Wrong date parsing
« on: February 25, 2011, 04:56:22 AM »
Hi Bruce,
I know you want to go out of your way to let users type just about anything in a date field - and you'll parse it at get something meaningful out of it (Bruce's 3.rd law, I think).

However, I've got a date field with this picture: @d06- and I'm using the date format dd-mm-yyyy in the app.

If I enter 110111 (January 11. 2011) it gets parsed as 19-06-2112 (June 19. 2112). I can't even guess how you do that!

A user called me about this so I thought I'd let you know.

Peter

 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Wrong date parsing
« Reply #1 on: February 25, 2011, 06:54:45 AM »
110111  is the clarion long date format for 19 june 2112 -
ie number of days since Jan 4 1801.

this is a tricky one because it's fundamentally tricky to figure out if the date is already deformatted, or not.
Also if deformatting it becomes difficult to figure out where the breaks are.

BTW - Bruce's 3rd law is
"The more you spend, the less you get".

Cheers
Bruce

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Wrong date parsing
« Reply #2 on: February 25, 2011, 07:30:47 AM »
Bruce, I hear what you're saying - but it does work in 'regular' clarion. And all 6-digit dates will meet your criteria of being x number of days since 04-01-1801.

Peter