SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2000
    Location
    Nottingham, England
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting a Julian Date.

    Is there a command within silktest that retuns the Julian date? Cannot seem to find anything relating to this.

    Cheers.

    ------------------

  2. #2
    Junior Member
    Join Date
    May 2001
    Location
    New Delhi , India
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting a Julian Date.

    Hi ,

    What my understanding of a Julain Date is :
    Julian dates are used to show the number of days that have passed and/or that are left in a given year.
    A Julian date format is : yyddd , where 'yy' is the year and 'ddd' is the day of the year.

    So , given the fact that we wanna calulate the days left in the given year , you could use the following code to return this value : [ This is VB code - you can translate it into 4Test script ] .

    'This procedure will return the number of days left in the current
    year.
    Sub DaysLeft()
    Dim JanNextYear As Date 'January 1 of next year
    Dim JanCurrentYear As Date 'January 1 of current year
    Dim DayNum As Integer 'Number of the current day
    Dim DaysLeftInYear As Integer 'Days left in the current year

    JanNextYear = DateSerial(1 + Year(Now), 1, 1)
    JanCurrentYear = DateSerial(Year(Now), 1, 1)
    DayNum = Int(((Now / 365.255) - (Year(Now) - 1900)) * 365.255)
    DaysLeftInYear = JanNextYear - JanCurrentYear - DayNum

    'Display the value of DaysLeftInYear
    MsgBox "Days left in the year: " & DaysLeftInYear
    End Sub

    And for calculating the number of days passed , use the following code : [ This is VB code - you can translate it into 4Test script ] .

    'This procedure will return the number of days that
    'have passed since January 1 of the current year.
    Sub DaysPassed()
    Dim DayOfYear As Integer 'Number of the current day

    DayOfYear = Int(((Now / 365.255) - (Year(Now) - 1900)) * 365.255)

    'Display the value of DayOfYear
    MsgBox "Day of the year: " & DayOfYear
    End Sub

    Hope this helps!!!!

    Regards,

    Grover.

    ------------------

  3. #3
    bjc
    bjc is offline
    Member
    Join Date
    Jan 2000
    Location
    CT
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting a Julian Date.

    try the following:

    look up FormatDateTime in the language ref.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:41 AM.

Copyright BetaSoft Inc.