Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Leading zero

Thread Tools

Re: Leading zero

Jukka K. Korpela
Posts: n/a
sheldonlg wrote:

> I* have a zip code stored in my database. It has a leading zero (say
> 01906, for example). It is stored as a varchar with the leading zero.

I see, or maybe I don't, but that's irrelevant in HTML context.

> When I print it out on the page,

You don't print anything in HTML.

> the leading zero is there. (It is
> between a <td></td>).

If you have <td>01906</td> in HTML, you should expect the cell content to be
shown as 01906.

> I also have an export to Excel routine that formats it in what is sent
> also between <td></td>.

Interesting, but quite irrelevant in HTML context.

> However, in Excel it appears without the
> leading zero (1906, for example).

Maybe, but how does that relate to HTML?

> How can I force the leading zero to appear?

In HTML you have you want, in Excel you don't. What makes this an HTML


Reply With Quote

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
All leading tabs or all leading spaces - why isn't that enforced? John Nagle Python 4 08-07-2007 04:05 PM
RE: All leading tabs or all leading spaces - why isn't that enforced? Delaney, Timothy (Tim) Python 0 08-07-2007 03:50 AM
printf question, leading zero in E format? bobm2005 C Programming 4 06-08-2007 12:35 AM
add leading zero tshad ASP .Net 2 11-09-2005 04:43 AM
newbie - integer variable with leading zero for os.makedirs james Python 2 12-02-2003 06:43 AM