DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Ajax DataGrid  
DwZone Forum Index -> Ajax DataGrid

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 431 to 440 of 485 (Total: 409) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re:Dynamic recordset  
View this persons public profile  gianluigi   14:50 9 Sep 2009  
   Re:Dynamic recordset  
View this persons public profile  [email protected]   15:06 9 Sep 2009  
   Re:Dynamic recordset  
View this persons public profile  gianluigi   10:10 10 Sep 2009  
   data formats  
View this persons public profile  [email protected]   9:51 9 Sep 2009  
   Re:data formats  
View this persons public profile  gianluigi   10:21 9 Sep 2009  
    Re:data formats  
View this persons public profile  [email protected]   10:41 9 Sep 2009  
 
What would be really slick, is a way to attach a function to a particular field. This would allow to format any data any way the user wants.

In my example, I use a function called unUDate(unixtimestamp).

So, when the database contains something like "1252496133", I specify that the display should be unUDate(1252496133), and it comes out as "9/9/2009 11:35:33 AM". Or date(unUDate(1252496133)) would be "9/9/2009"

I also run into the same problem with updating records. Would be nice if it could go in reverse for updating. for example if I entered "9/9/2009", it would allow to pass through a function that would format it to "1252454400".

Here's the functions as I use them now:

Private Function UDate(strDate)
UDate = DateDiff("s", "01/01/1970 00:00:00", strDate)
End Function

Private Function unUDate(uDate)
unUDate = DateAdd("s", uDate, "01/01/1970 00:00:00")
End Function

 
Reply to this current thread  View this persons public profile  Send Private Message
   Re:data formats  
View this persons public profile  gianluigi   12:34 9 Sep 2009  
   Re:data formats  
View this persons public profile  [email protected]   14:10 9 Sep 2009  
   Re:data formats  
View this persons public profile  gianluigi   14:55 9 Sep 2009  
   Re:data formats  
View this persons public profile  [email protected]   15:51 9 Sep 2009  
Last Visit: Thursday 9 Jan, 2025 11:22 am First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: