Dear Respected Gurus,
I need a coding assistant converting from gregorian to hijri and vice
versa. I have problem with this codes. the problem Gregorian to Hijri
gives 100% results. when i enter this to Hijri to gregorian it either
do nothing or go to next record on form. well there r two fields on
form that r calc afterevents each other dates.
ur assistance will be highly appreciated, if any one can tell what is
wrong with this codes
Function strHijri(dtGreg orian As Date) As String
' returns a date in Hijri format for a given western date
VBA.Calendar = vbCalHijri
strHijri = Day(dtGregorian ) & "/" _
& Month(dtGregori an) & "/" _
& Year(dtGregoria n)
VBA.Calendar = vbCalGreg
End Function
Function strGregorian(dt Hijri As String) As String
' returns a date in Hijri format for a given western date
VBA.Calendar = vbCalGreg
strGregorian = Day(dtHijri) & "/" _
& Month(dtHijri) & "/" _
& Year(dtHijri)
VBA.Calendar = vbCalHijri
End Function 5 16090
SalimShahzad wrote: Dear Respected Gurus,
I need a coding assistant converting from gregorian to hijri and vice versa. I have problem with this codes. the problem Gregorian to Hijri gives 100% results. when i enter this to Hijri to gregorian it either do nothing or go to next record on form. well there r two fields on form that r calc afterevents each other dates.
ur assistance will be highly appreciated, if any one can tell what is wrong with this codes
Function strHijri(dtGreg orian As Date) As String ' returns a date in Hijri format for a given western date VBA.Calendar = vbCalHijri strHijri = Day(dtGregorian ) & "/" _ & Month(dtGregori an) & "/" _ & Year(dtGregoria n) VBA.Calendar = vbCalGreg End Function
Function strGregorian(dt Hijri As String) As String ' returns a date in Hijri format for a given western date VBA.Calendar = vbCalGreg strGregorian = Day(dtHijri) & "/" _ & Month(dtHijri) & "/" _ & Year(dtHijri) VBA.Calendar = vbCalHijri
End Function
Did you check MichKa's site? www.trigeminal.com? He's the resident
internationaliz ation guru...
<pi********@hot mail.com> wrote in message
news:11******** *************@c 13g2000cwb.goog legroups.com... SalimShahzad wrote: Dear Respected Gurus,
I need a coding assistant converting from gregorian to hijri and vice versa. I have problem with this codes. the problem Gregorian to Hijri gives 100% results. when i enter this to Hijri to gregorian it either do nothing or go to next record on form. well there r two fields on form that r calc afterevents each other dates.
ur assistance will be highly appreciated, if any one can tell what is wrong with this codes
Function strHijri(dtGreg orian As Date) As String ' returns a date in Hijri format for a given western date VBA.Calendar = vbCalHijri strHijri = Day(dtGregorian ) & "/" _ & Month(dtGregori an) & "/" _ & Year(dtGregoria n) VBA.Calendar = vbCalGreg End Function
Function strGregorian(dt Hijri As String) As String ' returns a date in Hijri format for a given western date VBA.Calendar = vbCalGreg strGregorian = Day(dtHijri) & "/" _ & Month(dtHijri) & "/" _ & Year(dtHijri) VBA.Calendar = vbCalHijri
End Function
Did you check MichKa's site? www.trigeminal.com? He's the resident internationaliz ation guru...
He's got code to convert back and forth between Hijri and Gregorian at http://www.trigeminal.com/codes.asp?ItemID=14#14
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(No private e-mails, please)
See?!! I knew it was there! Makes me think I'd be better as a
librarian than a programmer!
Dear Gurus,
There is problem in passing date as string, can any one send reference
of codes will help a bit for me. as in text box, table field has set as
date.
when i call as msgbox under "1/1/2005" or "1/1/1426" it gives 100%
results, but when i used via text box value putting it gives unexpected
dates or results
i had try following
MsgBox StDteHijriOfStD teGreg("'" & Dt_Dob_en.Value & "'")
MsgBox StDteHijriOfStD teGreg( Dt_Dob_en.Value )
MsgBox StDteHijriOfStD teGreg(cstr(Dt_ Dob_en.Value))
even i define as string variable and pass value to this and then try
but the results is same...
can any one help me how to pass date as string to function in modules
thanks and rgds
shahzad
SalimShahzad wrote: Dear Gurus,
There is problem in passing date as string, can any one send
reference of codes will help a bit for me. as in text box, table field has set
as date.
when i call as msgbox under "1/1/2005" or "1/1/1426" it gives 100% results, but when i used via text box value putting it gives
unexpected dates or results
i had try following
MsgBox StDteHijriOfStD teGreg("'" & Dt_Dob_en.Value & "'") MsgBox StDteHijriOfStD teGreg( Dt_Dob_en.Value ) MsgBox StDteHijriOfStD teGreg(cstr(Dt_ Dob_en.Value))
even i define as string variable and pass value to this and then try but the results is same...
can any one help me how to pass date as string to function in modules thanks and rgds shahzad
You REALLY need to make friends with the helpfile. REALLY. How about
using something like oh, I dunno... CDATE() or DATESERIAL or one of
those other handy dandy conversion/date functions. Or shock of shocks,
pass the stupid thing as a DATE, not a text string. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: nimish |
last post by:
I have Month, Day and Year fields on my form. When I submit this form I
want to create a valid date from all three fields before inserting into
MYSQL table.
I tried following:
$dob=$Month."-".$Day."-".$Year;
$dob = strtotime($dob);
But it does not update my date field in the table.
I am novice in PHP, do you know where i am making a mistake.
|
by: Se'noj |
last post by:
Hi all,
In a program I am writing, I need to convert a date stored as an
integer number of days into a standard gregorian format, with day zero
being 1/1/1800. Can anyone help me with this?
Bryan Jones
NightDaemon Enterprises
nightdaemon.co.nr
|
by: Chris Davoli |
last post by:
Is there a class that converts from Gregorian date to TRUE Julian Date in
..NET? Any VB.NET examples available?
ie;
The Julian date is calculated by the number of days since January 1, 4713
BC. For example, the Julian date for August 1, 2001 is 2452122.
--
Chris Davoli
|
by: Franck |
last post by:
Hi,
'm gettin mad about date conversion.
Here is the point.
Got and add-in for Excel which call functions from a web service (on a
remote server)
The remote server has regional settings set to "en-UK" and date to
dd/MM/yyyy. (I'can't change it !)
|
by: vadala |
last post by:
The requirement is to send start data and end date from java to UI (.net) for a functionality.
We are setting the time in java (1.5) before handing it over to WebService (sending to UI ) in "ASIA/KUALA_LUMPUR" (MYT) TIMEZONE. OS WIN-XP
Strangely UI receives a different date.
java side
UI side
| |
by: bruce.dodds |
last post by:
Access seems to be handling a date string conversion inconsistently in
an append query.
The query converts a YYYYMM string into a date, using the following
function:
CDate(Right(,2) & "/1/" &
Left(,4))
I entered the string "200715" in a record to test an error condition.
|
by: RN1 |
last post by:
A TextBox displays the current date (in dd/mm/yyyy format) & time when
a user comes to a page (e.g. 15/10/2008 1:36:39 PM). To convert the
date into international format so that the remote server doesn't
generate any error, this is what I am doing:
---------------------------
Dim strSDate As String
Dim strSTime As String
Dim strStartDT As String
Dim strSDateTime As String
|
by: anderst |
last post by:
Hi!
I need help with date conversion, I need a perl-script that transform
Wed Mar 28 00:00:00 GMT+02:00 2007
to
2007-03-28
I have tried to use perl modules Date::Manip and Date::Calc, but no succes so far. Maybe I am doing it the wrong way.
|
by: maheshwag |
last post by:
my code is:
string sql="insert into dummy(date)values(@date)
sqlcommand cmd=new sqlcommand(sql,con)
cmd.parameters.Add("@date", SqlDbtype.datetime).values=maskedtextbox1.text;
cmd.ExecuteNonquery();
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |