473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Textbox Formatting Problem !

I'm importing & displaying data from a legacy DbaseIII+ system.

There's a Numeric field (6 characters) which displays the date in the
following manner: yymmdd (stored as a number in the table).

When I'm displaying this in a text box in my form I'd like it to
display as:
dd/mm/yy (including the slashes).

Can someone please tell me how to go about this ?

Thx & Best Rgds,
Prakash
Nov 12 '05 #1
2 1407
Function NumToDate(Num As Long) As Date

Dim DateStg As String, NewDateStg As String
Dim Day As String, Month As String, Year As String

DateStg = Right("0" & CStr(Num), 6)
Day = Right(DateStg, 2)
Month = Mid(DateStg, 3, 2)
Year = Left(DateStg, 2)
NewDateStg = Day & "/" & Month & "/" & Year
NumToDate = CDate(NewDateStg)
End Function

Phil
"Prakash Wadhwani" <si****@omantel.net.om> wrote in message
news:60**************************@posting.google.c om...
I'm importing & displaying data from a legacy DbaseIII+ system.

There's a Numeric field (6 characters) which displays the date in the
following manner: yymmdd (stored as a number in the table).

When I'm displaying this in a text box in my form I'd like it to
display as:
dd/mm/yy (including the slashes).

Can someone please tell me how to go about this ?

Thx & Best Rgds,
Prakash

Nov 12 '05 #2
Thx Phil !!

It worked a treat !!

Best Rgds,
Prakash.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Roberto Castro | last post by:
Hello! I have been assigned for the first time an adp Access project and so far I have managed to make the changes needed for some requirements. However, I am struggling to find the place where...
3
by: trint | last post by:
Ok, I have a textbox that I want to check as one types each charactor for Currency formatting, another one for Date formating. Any help is appreciated. Thanks, Trint
3
by: Adrian | last post by:
Hi, I have an xml doc in a string it all just runs to gether no crlf or indents, I want to lay it out in a textbox so each element is on its ownline and indented correctly. how do I do this ...
4
by: slinky | last post by:
Thanks in advance... I have a continuous style form with a field for each record called "STATUS". I simply want to have the form load and if the value of the textbox is "Inactive" I want the...
2
by: robertng90025 | last post by:
I'm having a problem with MS Access 2003 and its conditional formatting. I have textboxes on a continuous form whose left and right margins are set to 0.03 inches. Based on each textbox's...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.