SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-12-2009, 09:31 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
sorting by adding leading 0 to small numbers

Is there are way to within studio not externally add a leading 0 to strings like 1 thru 9. so when sorting it will sort

01
02
..
09
10

instead of
1
10
2

I guess I am looking for a sort method that does this thanks
Reply With Quote
  #2  
Old 08-12-2009, 11:26 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Where is the data coming from? Can you generate it as an array of integers instead of an array of strings? Integers sort numerically; strings sort lexically (i.e. as text, not as numbers). So if you want them treated as numbers, store them as numbers rather than as text.
__________________
-- Greg
Reply With Quote
  #3  
Old 08-12-2009, 11:30 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Where is the data coming from? Can you generate it as an array of integers instead of an array of strings? Integers sort numerically; strings sort lexically (i.e. as text, not as numbers). So if you want them treated as numbers, store them as numbers rather than as text.
ok thanks for the advice I will change them to integers not a big problem.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting nathanm SageTV Studio 3 11-12-2006 11:15 AM
Library sorting darkside SageTV Software 1 06-19-2004 10:09 PM
Sorting Guide m0ng00se30 SageTV Beta Test Software 3 04-09-2004 01:16 PM
Sorting Recordings kummell SageTV Beta Test Software 0 01-30-2004 01:38 PM
Sorting XMLTV drifting SageTV United Kingdom 3 08-28-2003 10:46 AM


All times are GMT -6. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.